summaryrefslogtreecommitdiff
path: root/test/integration/targets/ansible
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2019-07-17 10:39:30 -0400
committerGitHub <noreply@github.com>2019-07-17 10:39:30 -0400
commita39b721db50d9e12ec04d8628a0cd593f66d2880 (patch)
tree2e652be1f39197872aac2ac36596431d3ee8d4bc /test/integration/targets/ansible
parent5ac2c6d4fe97ec3e2c25ce53bc6daaead0d8f3b4 (diff)
downloadansible-a39b721db50d9e12ec04d8628a0cd593f66d2880.tar.gz
fixes to config manager (#58530)
* skip unreadable ansible.cfg * all types should check for type * patch access for tests and fix tests that relied on missing files not being checked
Diffstat (limited to 'test/integration/targets/ansible')
-rw-r--r--test/integration/targets/ansible/no-extension2
-rwxr-xr-xtest/integration/targets/ansible/runme.sh2
2 files changed, 3 insertions, 1 deletions
diff --git a/test/integration/targets/ansible/no-extension b/test/integration/targets/ansible/no-extension
new file mode 100644
index 0000000000..61a99f48bb
--- /dev/null
+++ b/test/integration/targets/ansible/no-extension
@@ -0,0 +1,2 @@
+[defaults]
+remote_user = admin
diff --git a/test/integration/targets/ansible/runme.sh b/test/integration/targets/ansible/runme.sh
index e9554934ba..515058e71e 100755
--- a/test/integration/targets/ansible/runme.sh
+++ b/test/integration/targets/ansible/runme.sh
@@ -14,7 +14,7 @@ ANSIBLE_REMOTE_USER=administrator ansible-config dump| grep 'DEFAULT_REMOTE_USER
ansible-config list | grep 'DEFAULT_REMOTE_USER'
# 'view' command must fail when config file is missing or has an invalid file extension
-ansible-config view -c ./ansible-non-existent.cfg 2> err1.txt || grep -Eq '(FileNotFoundError|IOError): \[Errno [0-9]+\] No such file or directory' err1.txt || (cat err*.txt; rm -f err1.txt; exit 1)
+ansible-config view -c ./ansible-non-existent.cfg 2> err1.txt || grep -Eq 'ERROR! The provided configuration file is missing or not accessible:' err1.txt || (cat err*.txt; rm -f err1.txt; exit 1)
ansible-config view -c ./no-extension 2> err2.txt || grep -q 'Unsupported configuration file extension' err2.txt || (cat err2.txt; rm -f err*.txt; exit 1)
rm -f err*.txt