From 8e5dfa032a92b51686bba553c35465fddd4fe2ab Mon Sep 17 00:00:00 2001 From: xu Date: Wed, 18 Dec 2024 14:52:42 +0800 Subject: [PATCH 01/12] enable appgateway test --- tests/integration/targets/azure_rm_appgateway/aliases | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/targets/azure_rm_appgateway/aliases b/tests/integration/targets/azure_rm_appgateway/aliases index 238a15743..4090cf52f 100644 --- a/tests/integration/targets/azure_rm_appgateway/aliases +++ b/tests/integration/targets/azure_rm_appgateway/aliases @@ -1,5 +1,4 @@ cloud/azure destructive shippable/azure/group6 -disabled needs/file/tests/integration_common_tasks/managed_identity.yml From efb6b69d18085cad81e0998a93401f2c63996c10 Mon Sep 17 00:00:00 2001 From: xu Date: Wed, 18 Dec 2024 16:45:33 +0800 Subject: [PATCH 02/12] add collection community.general --- tests/utils/ado/ado.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index d2e395377..6ef135509 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,6 +69,8 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint +ansible-galaxy collection install community.general + timeout=180 if [ "$4" = "all" ] From 7005da7d9f5f221b6bb02082ad8b4f9de42b52ab Mon Sep 17 00:00:00 2001 From: xu Date: Wed, 18 Dec 2024 16:54:50 +0800 Subject: [PATCH 03/12] add logs --- tests/utils/ado/ado.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index 6ef135509..3362dc14d 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,7 +69,18 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint +echo '---------------------------------------------------- check start ----------------------------------------------------' +ansible-galaxy collection list +echo '---------------------------------------------------- check end ----------------------------------------------------' + +echo '---------------------------------------------------- install community.general start ----------------------------------------------------' ansible-galaxy collection install community.general +echo '---------------------------------------------------- install community.general end ----------------------------------------------------' + + +echo '---------------------------------------------------- check start ----------------------------------------------------' +ansible-galaxy collection list +echo '---------------------------------------------------- check end ----------------------------------------------------' timeout=180 From 4051c7c888c9a115db69022c495cfea054aec5f1 Mon Sep 17 00:00:00 2001 From: xu Date: Thu, 19 Dec 2024 14:48:01 +0800 Subject: [PATCH 04/12] remove prefix --- .../azure_rm_appgateway/tasks/main.yml | 2 +- tests/utils/ado/ado.sh | 23 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml index f07ae49c7..cfd1aa8a5 100644 --- a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml +++ b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml @@ -35,7 +35,7 @@ - name: Assert there are no gateways ansible.builtin.assert: that: - - appgw_output.gateways | community.general.json_query(query) | length == 0 + - appgw_output.gateways | json_query(query) | length == 0 - name: Create a virtual network azure_rm_virtualnetwork: diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index 3362dc14d..cdbb9c17c 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,18 +69,17 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint -echo '---------------------------------------------------- check start ----------------------------------------------------' -ansible-galaxy collection list -echo '---------------------------------------------------- check end ----------------------------------------------------' - -echo '---------------------------------------------------- install community.general start ----------------------------------------------------' -ansible-galaxy collection install community.general -echo '---------------------------------------------------- install community.general end ----------------------------------------------------' - - -echo '---------------------------------------------------- check start ----------------------------------------------------' -ansible-galaxy collection list -echo '---------------------------------------------------- check end ----------------------------------------------------' +#echo '---------------------------------------------------- check start ----------------------------------------------------' +#ansible-galaxy collection list +#echo '---------------------------------------------------- check end ----------------------------------------------------' +# +#echo '---------------------------------------------------- install community.general start ----------------------------------------------------' +#ansible-galaxy collection install community.general +#echo '---------------------------------------------------- install community.general end ----------------------------------------------------' +# +#echo '---------------------------------------------------- check start ----------------------------------------------------' +#ansible-galaxy collection list +#echo '---------------------------------------------------- check end ----------------------------------------------------' timeout=180 From f5862e5ce019368faf4b435452adfbbd72343ccc Mon Sep 17 00:00:00 2001 From: xu Date: Thu, 19 Dec 2024 15:27:05 +0800 Subject: [PATCH 05/12] add log --- tests/utils/ado/ado.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index cdbb9c17c..d6685f1c6 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,17 +69,17 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint -#echo '---------------------------------------------------- check start ----------------------------------------------------' -#ansible-galaxy collection list -#echo '---------------------------------------------------- check end ----------------------------------------------------' -# -#echo '---------------------------------------------------- install community.general start ----------------------------------------------------' -#ansible-galaxy collection install community.general -#echo '---------------------------------------------------- install community.general end ----------------------------------------------------' -# -#echo '---------------------------------------------------- check start ----------------------------------------------------' -#ansible-galaxy collection list -#echo '---------------------------------------------------- check end ----------------------------------------------------' +echo '---------------------------------------------------- check start ----------------------------------------------------' +ansible-galaxy collection list +echo '---------------------------------------------------- check end ----------------------------------------------------' + +echo '---------------------------------------------------- install community.general start ----------------------------------------------------' +ansible-galaxy collection install community.general +echo '---------------------------------------------------- install community.general end ----------------------------------------------------' + +echo '---------------------------------------------------- check start ----------------------------------------------------' +ansible-galaxy collection list +echo '---------------------------------------------------- check end ----------------------------------------------------' timeout=180 From cf3ca3667e9ccfe0c693aabeed9e6f1ee9feff6b Mon Sep 17 00:00:00 2001 From: xu Date: Thu, 19 Dec 2024 16:14:03 +0800 Subject: [PATCH 06/12] add log --- pr-pipelines.yml | 2 ++ tests/utils/ado/ado.sh | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pr-pipelines.yml b/pr-pipelines.yml index 7a56836ac..d2a5aed3b 100644 --- a/pr-pipelines.yml +++ b/pr-pipelines.yml @@ -23,6 +23,8 @@ parameters: - "2.14" - "2.15" - "2.16" + - "2.17" + - "2.18" - "devel" - name: MODULE_NAME displayName: 'Test Module' diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index d6685f1c6..07c435cf1 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,10 +69,6 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint -echo '---------------------------------------------------- check start ----------------------------------------------------' -ansible-galaxy collection list -echo '---------------------------------------------------- check end ----------------------------------------------------' - echo '---------------------------------------------------- install community.general start ----------------------------------------------------' ansible-galaxy collection install community.general echo '---------------------------------------------------- install community.general end ----------------------------------------------------' @@ -81,6 +77,12 @@ echo '---------------------------------------------------- check start --------- ansible-galaxy collection list echo '---------------------------------------------------- check end ----------------------------------------------------' + +echo '---------------------------------------------------- check start ----------------------------------------------------' +ls -al ansible_collections +echo '---------------------------------------------------- check end ----------------------------------------------------' + + timeout=180 if [ "$4" = "all" ] From 744625f0a4bfdb7c31718d10b213230aa49caca6 Mon Sep 17 00:00:00 2001 From: xu Date: Thu, 19 Dec 2024 17:10:17 +0800 Subject: [PATCH 07/12] add community.general --- tests/utils/ado/ado.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index 07c435cf1..c74e28eb5 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,19 +69,7 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint -echo '---------------------------------------------------- install community.general start ----------------------------------------------------' -ansible-galaxy collection install community.general -echo '---------------------------------------------------- install community.general end ----------------------------------------------------' - -echo '---------------------------------------------------- check start ----------------------------------------------------' -ansible-galaxy collection list -echo '---------------------------------------------------- check end ----------------------------------------------------' - - -echo '---------------------------------------------------- check start ----------------------------------------------------' -ls -al ansible_collections -echo '---------------------------------------------------- check end ----------------------------------------------------' - +ansible-galaxy collection install community.general -p "${HOME}/.ansible" timeout=180 From 3004ca60c9f9eedf5decfee071c4ae38e6cce799 Mon Sep 17 00:00:00 2001 From: xu Date: Thu, 19 Dec 2024 17:19:52 +0800 Subject: [PATCH 08/12] reset pwd --- tests/integration/targets/azure_rm_appgateway/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml index cfd1aa8a5..1c70b8eaf 100644 --- a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml +++ b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml @@ -1,7 +1,6 @@ - name: Gather Resource Group info azure.azcollection.azure_rm_resourcegroup_info: name: "{{ resource_group }}" - password: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits', 'punctuation'], length=12) }}" register: __rg_info - name: Prepare random number @@ -11,6 +10,7 @@ cert2_file: "cert2.txt" cert3b64_file: "cert3b64.txt" location: "{{ __rg_info.resourcegroups.0.location }}" + password: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits', 'punctuation'], length=12) }}" run_once: true - name: Set json query to only retrieve gateways from this test ansible.builtin.set_fact: From 4f23927ebe1ff68f164830f919907442aa4da48c Mon Sep 17 00:00:00 2001 From: xu Date: Thu, 19 Dec 2024 17:28:58 +0800 Subject: [PATCH 09/12] test cert pwd --- tests/integration/targets/azure_rm_appgateway/tasks/main.yml | 2 +- tests/utils/ado/ado.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml index 1c70b8eaf..69dbdb05f 100644 --- a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml +++ b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml @@ -10,7 +10,7 @@ cert2_file: "cert2.txt" cert3b64_file: "cert3b64.txt" location: "{{ __rg_info.resourcegroups.0.location }}" - password: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits', 'punctuation'], length=12) }}" + password: "your-password" run_once: true - name: Set json query to only retrieve gateways from this test ansible.builtin.set_fact: diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index c74e28eb5..1c147fdaa 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,6 +69,7 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint +# tmp workaround ansible-galaxy collection install community.general -p "${HOME}/.ansible" timeout=180 From 200c3fd10cce2382a7b5bd48ca4e279013d3c242 Mon Sep 17 00:00:00 2001 From: xu Date: Fri, 20 Dec 2024 15:43:48 +0800 Subject: [PATCH 10/12] fix test --- tests/integration/targets/azure_rm_appgateway/tasks/main.yml | 2 +- tests/utils/ado/ado.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml index 69dbdb05f..c52e61c86 100644 --- a/tests/integration/targets/azure_rm_appgateway/tasks/main.yml +++ b/tests/integration/targets/azure_rm_appgateway/tasks/main.yml @@ -35,7 +35,7 @@ - name: Assert there are no gateways ansible.builtin.assert: that: - - appgw_output.gateways | json_query(query) | length == 0 + - appgw_output.gateways | community.general.json_query(query) | length == 0 - name: Create a virtual network azure_rm_virtualnetwork: diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index 1c147fdaa..d2e395377 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -69,9 +69,6 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint -# tmp workaround -ansible-galaxy collection install community.general -p "${HOME}/.ansible" - timeout=180 if [ "$4" = "all" ] From 8fef7b61084144e25a6b2f7da47e303ecfa4839f Mon Sep 17 00:00:00 2001 From: xu Date: Fri, 20 Dec 2024 16:13:53 +0800 Subject: [PATCH 11/12] reset collection path --- tests/utils/ado/ado.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index d2e395377..d87c62e1e 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -58,7 +58,7 @@ fi source hacking/env-setup pip install paramiko PyYAML Jinja2 httplib2 six -TEST_DIR="${HOME}/.ansible/ansible_collections/azure/azcollection" +TEST_DIR="${HOME}/.ansible/ansible_collections" mkdir -p "${TEST_DIR}" cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}" cd "${TEST_DIR}" From 61c0fc91ac9c1d7da31d80a7694e5ae099628d26 Mon Sep 17 00:00:00 2001 From: xu Date: Fri, 20 Dec 2024 16:23:04 +0800 Subject: [PATCH 12/12] reset community.general path --- tests/utils/ado/ado.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/utils/ado/ado.sh b/tests/utils/ado/ado.sh index d87c62e1e..1c147fdaa 100755 --- a/tests/utils/ado/ado.sh +++ b/tests/utils/ado/ado.sh @@ -58,7 +58,7 @@ fi source hacking/env-setup pip install paramiko PyYAML Jinja2 httplib2 six -TEST_DIR="${HOME}/.ansible/ansible_collections" +TEST_DIR="${HOME}/.ansible/ansible_collections/azure/azcollection" mkdir -p "${TEST_DIR}" cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}" cd "${TEST_DIR}" @@ -69,6 +69,9 @@ pip install -I -r "${TEST_DIR}/sanity-requirements.txt" pip install ansible-lint +# tmp workaround +ansible-galaxy collection install community.general -p "${HOME}/.ansible" + timeout=180 if [ "$4" = "all" ]