diff options
Diffstat (limited to '')
-rw-r--r-- | test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testlist.ps1 | 12 | ||||
-rw-r--r-- | test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testpath.ps1 | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testlist.ps1 b/test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testlist.ps1 new file mode 100644 index 0000000..06ef17b --- /dev/null +++ b/test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testlist.ps1 @@ -0,0 +1,12 @@ +#powershell + +#Requires -Module Ansible.ModuleUtils.Legacy + +$params = Parse-Args $args +$value = Get-AnsibleParam -Obj $params -Name value -Type list + +if ($value -isnot [array]) { + Fail-Json -obj @{} -message "value was not a list but was $($value.GetType().FullName)" +} + +Exit-Json @{ count = $value.Count } diff --git a/test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testpath.ps1 b/test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testpath.ps1 new file mode 100644 index 0000000..7a6ba0b --- /dev/null +++ b/test/integration/targets/module_utils_Ansible.ModuleUtils.Legacy/library/testpath.ps1 @@ -0,0 +1,9 @@ +#powershell + +#Requires -Module Ansible.ModuleUtils.Legacy + +$params = Parse-Args $args + +$path = Get-AnsibleParam -Obj $params -Name path -Type path + +Exit-Json @{ path = $path } |