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:
Matt Clay 2026-02-03 17:08:59 -08:00 committed by GitHub
parent 66a9e19010
commit 7f17759bfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 2 deletions

View file

@ -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

View file

@ -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 "${@}"

View file

@ -0,0 +1,3 @@
context/target
gather_facts/no
shippable/posix/group2

View 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 }}"