summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2019-04-04 08:22:55 +0200
committerMatt Clay <matt@mystile.com>2019-04-04 08:39:45 +0200
commit414ac12ddd785bd0a5b534d7b1571269ee8380ae (patch)
tree02b7302d12c1697f05de4d2460e2ab624da5a3fb /test
parentAdd felixfontein as notified for ufw module. (#54808) (diff)
downloadansible-414ac12ddd785bd0a5b534d7b1571269ee8380ae.tar.xz
ansible-414ac12ddd785bd0a5b534d7b1571269ee8380ae.zip
Add work-around for scp issue in tests.
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/targets/connection_ssh/runme.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/integration/targets/connection_ssh/runme.sh b/test/integration/targets/connection_ssh/runme.sh
index 18eaf87d3a..a24ff048c5 100755
--- a/test/integration/targets/connection_ssh/runme.sh
+++ b/test/integration/targets/connection_ssh/runme.sh
@@ -2,9 +2,22 @@
set -eux
+# temporary work-around for issues due to new scp filename checking
+# https://github.com/ansible/ansible/issues/52640
+if [[ "$(scp -T 2>&1)" == "usage: scp "* ]]; then
+ # scp supports the -T option
+ # work-around required
+ scp_args=("-e" "ansible_scp_extra_args=-T")
+else
+ # scp does not support the -T option
+ # no work-around required
+ # however we need to put something in the array to keep older versions of bash happy
+ scp_args=("-e" "")
+fi
+
# sftp
./posix.sh "$@"
# scp
-ANSIBLE_SCP_IF_SSH=true ./posix.sh "$@"
+ANSIBLE_SCP_IF_SSH=true ./posix.sh "$@" "${scp_args[@]}"
# piped
ANSIBLE_SSH_TRANSFER_METHOD=piped ./posix.sh "$@"