Skip to content

Commit 47efbcf

Browse files
committedFeb 12, 2025·
test reorg
1 parent daf3fe3 commit 47efbcf

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed
 

‎infra/azure/templates/prepare_environment.yaml

+21-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,24 @@ steps:
2828
retryCountOnTaskFailure: 5
2929
displayName: Install Ansible collections
3030

31-
# - script: infra/image/start.sh ${{ parameters.distro }}-server
32-
# displayName: Setup target container for ${{ parameters.distro }}
31+
# Deployment of IPA servers/clients is done through the collection
32+
- script: |
33+
git fetch --unshallow
34+
utils/build-galaxy-release.sh -i
35+
retryCountOnTaskFailure: 5
36+
displayName: Build Galaxy release - Temp
37+
38+
- script: cat infra/scenarios/ipa-ad-trust.yml
39+
displayName: Show configuration - Debug
40+
41+
- script: |
42+
infra/scenarios/start-scenario -D infra/scenarios/ipa-ad-trust.yml
43+
# workaround for 'sudo'
44+
podman exec addc chmod u+r /etc/shadow
45+
podman exec server chmod u+r /etc/shadow
46+
podman exec cli01 chmod u+r /etc/shadow
47+
# Deploy nodes
48+
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/deploy_*.yml ||:
49+
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/install-cluster.yml || exit 1
50+
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/config_*.yml ||:
51+
displayName: Prepare testing scenario

‎infra/azure/templates/run_tests.yml

+4-26
Original file line numberDiff line numberDiff line change
@@ -53,41 +53,19 @@ jobs:
5353
env:
5454
SKIP_GIT_TEST: ${{ parameters.skip_git_test }}
5555
56-
# Deployment of IPA servers/clients is done through the collection
5756
- script: |
58-
git fetch --unshallow
59-
utils/build-galaxy-release.sh -i
60-
retryCountOnTaskFailure: 5
61-
displayName: Build Galaxy release
62-
63-
- script: cat infra/scenarios/ipa-ad-trust.yml
64-
displayName: Debug - Show configuration
65-
66-
- script: |
67-
# [ "${{ parameters.test_galaxy }}" == "True" ] && cd ~/.ansible/collections/ansible_collections/freeipa/ansible_freeipa
68-
#
69-
infra/scenarios/start-scenario -D infra/scenarios/ipa-ad-trust.yml
70-
# Give a chance for containers to be up
71-
sleep 5
72-
# workaround for 'sudo'
73-
podman exec addc chmod u+r /etc/shadow
74-
podman exec server chmod u+r /etc/shadow
75-
podman exec cli01 chmod u+r /etc/shadow
76-
# Deploy nodes
77-
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/deploy_*.yml ||:
78-
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/install-cluster.yml || exit 1
79-
ansible-playbook -i ansible-freeipa-scenario/inventory.yml ansible-freeipa-scenario/playbooks/config_*.yml ||:
8057
# Run tests
81-
infra/scenarios/run_test_scenario.sh -k
58+
infra/scenarios/run_test_scenario.sh -k -vvv
8259
displayName: Run playbook tests
8360
env:
8461
SKIP_GIT_TEST: ${{ parameters.skip_git_test }}
85-
${{ if not(parameters.test_galaxy) }}:
62+
${{ if not(parameters.test_galaxy) }}:
8663
ANSIBLE_ROLES_PATH: "${PWD}/roles"
8764
ANSIBLE_LIBRARY: "${PWD}/plugins"
8865
ANSIBLE_MODULE_UTILS: "${PWD}/plugins/module_utils"
66+
${{ if parameters.test_galaxy }}:
67+
ANSIBLE_COLLECTIONS_PATH: "${HOME}/.ansible/collections/ansible_collections"
8968
IPA_DISABLED_MODULES: ${{ variables.ipa_disabled_modules }}
9069
IPA_DISABLED_TESTS: ${{ variables.ipa_disabled_tests }}
9170
IPA_ENABLED_MODULES: ${{ variables.ipa_enabled_modules }}
9271
IPA_ENABLED_TESTS: ${{ variables.ipa_enabled_tests }}
93-
# IPA_VERBOSITY: "-vvv"

‎infra/scenarios/run_test_scenario.sh

+3
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,6 @@ then
173173
echo "Shutting down environment"
174174
infra/scenarios/stop-scenario
175175
fi
176+
177+
# Return error code
178+
[ "${error:-"NO"}" == "YES" ]

0 commit comments

Comments
 (0)