From 8420a4248c5b74a9413263ad1d087dd03b95fd35 Mon Sep 17 00:00:00 2001 From: abhinavbansal29 Date: Tue, 10 Dec 2024 16:58:15 +0530 Subject: [PATCH 1/2] Workaround for saml ipds test cases --- .../tasks/all_operation.yml | 6 ++++- .../prepare_env/playbooks/prepare_env.yml | 22 ++++++++++++------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml b/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml index 254e38740..a42e7f6f4 100644 --- a/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml +++ b/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml @@ -56,6 +56,10 @@ fail_msg: " Unable to Verify spec generation for identity providers with check_mode " success_msg: " Verify spec generation for identity providers with check_mode finished successfully " +- name: Read content from file + set_fact: + xml_file_content: "{{ lookup('file', xml_content.dest + '/content.txt') }}" + - name: Create saml ntnx_saml_identity_providers_v2: name: "{{ full_name }}1" @@ -63,7 +67,7 @@ email_attribute: email groups_attribute: groups groups_delim: "," - idp_metadata_xml: "{{ xml_content }}" + idp_metadata_xml: "{{ xml_file_content }}" state: present register: result ignore_errors: true diff --git a/tests/integration/targets/prepare_env/playbooks/prepare_env.yml b/tests/integration/targets/prepare_env/playbooks/prepare_env.yml index 7f603e6d0..045cc5b06 100644 --- a/tests/integration/targets/prepare_env/playbooks/prepare_env.yml +++ b/tests/integration/targets/prepare_env/playbooks/prepare_env.yml @@ -202,11 +202,17 @@ mode: "0644" url: "{{ disk_image.url }}" dest: "{{ disk_image.dest }}" -# # - name: create address group for network security policy related tests -# # nutanix.ncp.ntnx_address_groups: -# # state: present -# # name: dest -# # desc: dest -# # subnets: -# # - network_ip: "10.1.1.0" -# # network_prefix: 24 + # # - name: create address group for network security policy related tests + # # nutanix.ncp.ntnx_address_groups: + # # state: present + # # name: dest + # # desc: dest + # # subnets: + # # - network_ip: "10.1.1.0" + # # network_prefix: 24 + + - name: Downloading xml content for saml tests + ansible.builtin.get_url: + mode: "0644" + url: "{{ xml_content.url }}" + dest: "{{ xml_content.dest }}" From 5b8f38d69be252d3e4ce59039bd5fde56166f37c Mon Sep 17 00:00:00 2001 From: abhinavbansal29 Date: Tue, 10 Dec 2024 17:07:50 +0530 Subject: [PATCH 2/2] Fixed ansible lint issue --- .../ntnx_saml_identity_providers_v2/tasks/all_operation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml b/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml index a42e7f6f4..ced2314dc 100644 --- a/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml +++ b/tests/integration/targets/ntnx_saml_identity_providers_v2/tasks/all_operation.yml @@ -57,7 +57,7 @@ success_msg: " Verify spec generation for identity providers with check_mode finished successfully " - name: Read content from file - set_fact: + ansible.builtin.set_fact: xml_file_content: "{{ lookup('file', xml_content.dest + '/content.txt') }}" - name: Create saml