From 013c7b4a9801f8ac931809aa6bfdf0080ed1cfb1 Mon Sep 17 00:00:00 2001 From: george-ghawali Date: Thu, 12 Dec 2024 21:04:36 +0200 Subject: [PATCH] Adding fix when categories are not coming in order in the response (#537) --- .../tasks/vms_categories.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/integration/targets/ntnx_vms_categories_v2/tasks/vms_categories.yml b/tests/integration/targets/ntnx_vms_categories_v2/tasks/vms_categories.yml index 858a6ee9..28f521f1 100644 --- a/tests/integration/targets/ntnx_vms_categories_v2/tasks/vms_categories.yml +++ b/tests/integration/targets/ntnx_vms_categories_v2/tasks/vms_categories.yml @@ -81,8 +81,8 @@ - result.response is defined - result.changed == false - result.failed == false - - all_categories[0] == "{{ category_ext_id }}" - - all_categories[1] == "{{ category_ext_id1 }}" + - "'{{ category_ext_id }}' in {{ all_categories }}" + - "'{{ category_ext_id1 }}' in {{ all_categories }}" - result.vm_ext_id == "{{ vm_uuid }}" fail_msg: " Associate category to VM - check mode is enabled failed " success_msg: " Associate category to VM - check mode is enabled passed " @@ -180,9 +180,9 @@ - result.failed == false - result.response.categories | length > 0 - all_categories | length == 3 - - all_categories[0] == "{{ category_ext_id }}" - - all_categories[1] == "{{ category_ext_id1 }}" - - all_categories[2] == "{{ category_ext_id2 }}" + - "'{{ category_ext_id }}' in {{ all_categories }}" + - "'{{ category_ext_id1 }}' in {{ all_categories }}" + - "'{{ category_ext_id2 }}' in {{ all_categories }}" fail_msg: "Get categories from VM failed " success_msg: "Get categories from VM passed " @@ -209,8 +209,8 @@ - result.response is defined - result.changed == false - result.failed == false - - all_categories[0] == "{{ category_ext_id }}" - - all_categories[1] == "{{ category_ext_id1 }}" + - "'{{ category_ext_id }}' in {{ all_categories }}" + - "'{{ category_ext_id1 }}' in {{ all_categories }}" - result.vm_ext_id == "{{ vm_uuid }}" fail_msg: " Disassociate category from VM - check mode is enabled failed " success_msg: " Disassociate category from VM - check mode is enabled passed " @@ -281,8 +281,8 @@ - result.failed == false - result.response.categories | length > 0 - all_categories | length == 2 - - all_categories[0] == "{{ category_ext_id1 }}" - - all_categories[1] == "{{ category_ext_id2 }}" + - "'{{ category_ext_id1 }}' in {{ all_categories }}" + - "'{{ category_ext_id2 }}' in {{ all_categories }}" fail_msg: "Get categories from VM failed " success_msg: "Get categories from VM passed "