mirror of
https://github.com/ansible/ansible.git
synced 2026-02-03 20:40:24 -05:00
Integration test updates for PowerShell support (#86519)
Minor test additions/updates to prepare for improved PowerShell support in ansible-test.
This commit is contained in:
parent
66a9e19010
commit
7f17759bfe
4 changed files with 15 additions and 2 deletions
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
# The third PATH entry is the injected bin directory created by ansible-test.
|
# The PATH entry ending in "-bin" is the injected bin directory created by ansible-test.
|
||||||
bin_dir="$(python -c 'import os; print(os.environ["PATH"].split(":")[2])')"
|
bin_dir="$(python -c 'import os; print([path for path in os.environ["PATH"].split(":") if path.endswith("-bin")][0])')"
|
||||||
|
|
||||||
while IFS= read -r name
|
while IFS= read -r name
|
||||||
do
|
do
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ if ! command -V pwsh; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pwsh --version
|
||||||
|
|
||||||
# Use a PowerShell-only collection to verify that validate-modules does not load the collection loader multiple times.
|
# Use a PowerShell-only collection to verify that validate-modules does not load the collection loader multiple times.
|
||||||
ansible-test sanity --test validate-modules --color --truncate 0 "${@}"
|
ansible-test sanity --test validate-modules --color --truncate 0 "${@}"
|
||||||
|
|
||||||
|
|
|
||||||
3
test/integration/targets/powershell/aliases
Normal file
3
test/integration/targets/powershell/aliases
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
context/target
|
||||||
|
gather_facts/no
|
||||||
|
shippable/posix/group2
|
||||||
8
test/integration/targets/powershell/tasks/main.yml
Normal file
8
test/integration/targets/powershell/tasks/main.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
- name: Get PowerShell version
|
||||||
|
command: pwsh --version
|
||||||
|
register: powershell_version
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- name: Show PowerShell Version
|
||||||
|
debug:
|
||||||
|
msg: "{{ powershell_version.stdout }}"
|
||||||
Loading…
Reference in a new issue