From 9213d0c5b0ba42b5aaca14cd1b8417ef153a2cf0 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 19 Jan 2017 17:10:33 -0800 Subject: [PATCH] Fix and enable more tests for osx and freebsd. (#20482) * Fix `iterators` test for osx. * Enable `git` test for osx. * Enable `get_url` test for osx and freebsd. * Remove unused SNI_URI from uri test. * Use ansible hosted SNI host oustside docker. * Enable `uri` test for osx and freebsd. * Enable `gathering_facts` test for osx. * Skip single task on osx until test is fixed. --- test/integration/targets/gathering_facts/aliases | 1 - .../targets/gathering_facts/test_gathering_facts.yml | 2 +- test/integration/targets/get_url/aliases | 2 -- test/integration/targets/git/aliases | 1 - test/integration/targets/git/tasks/checkout-new-tag.yml | 3 +++ test/integration/targets/iterators/aliases | 1 - test/integration/targets/iterators/tasks/main.yml | 4 ++-- .../integration/targets/prepare_http_tests/defaults/main.yml | 2 +- test/integration/targets/uri/aliases | 2 -- test/integration/targets/uri/vars/main.yml | 5 ----- 10 files changed, 7 insertions(+), 16 deletions(-) diff --git a/test/integration/targets/gathering_facts/aliases b/test/integration/targets/gathering_facts/aliases index be46696124..79d8b9285e 100644 --- a/test/integration/targets/gathering_facts/aliases +++ b/test/integration/targets/gathering_facts/aliases @@ -1,2 +1 @@ posix/ci/group3 -skip/osx diff --git a/test/integration/targets/gathering_facts/test_gathering_facts.yml b/test/integration/targets/gathering_facts/test_gathering_facts.yml index bfa5cf3687..6f15f7afca 100644 --- a/test/integration/targets/gathering_facts/test_gathering_facts.yml +++ b/test/integration/targets/gathering_facts/test_gathering_facts.yml @@ -55,7 +55,7 @@ that: - 'ansible_user_id|default("UNDEF_MIN") != "UNDEF_MIN"' - 'ansible_interfaces|default("UNDEF_NET") == "UNDEF_NET"' - - 'ansible_mounts|default("UNDEF_HW") != "UNDEF_HW"' + - 'ansible_mounts|default("UNDEF_HW") != "UNDEF_HW" or ansible_distribution == "MacOSX"' - 'ansible_virtualization_role|default("UNDEF_VIRT") == "UNDEF_VIRT"' - hosts: facthost4 diff --git a/test/integration/targets/get_url/aliases b/test/integration/targets/get_url/aliases index 5d97a9be5e..8e7d715f9c 100644 --- a/test/integration/targets/get_url/aliases +++ b/test/integration/targets/get_url/aliases @@ -1,4 +1,2 @@ destructive posix/ci/group1 -skip/freebsd -skip/osx diff --git a/test/integration/targets/git/aliases b/test/integration/targets/git/aliases index 796f3e41ed..8e7d715f9c 100644 --- a/test/integration/targets/git/aliases +++ b/test/integration/targets/git/aliases @@ -1,3 +1,2 @@ destructive posix/ci/group1 -skip/osx diff --git a/test/integration/targets/git/tasks/checkout-new-tag.yml b/test/integration/targets/git/tasks/checkout-new-tag.yml index fded0af634..d0ba656775 100644 --- a/test/integration/targets/git/tasks/checkout-new-tag.yml +++ b/test/integration/targets/git/tasks/checkout-new-tag.yml @@ -48,6 +48,9 @@ that: - not update_new_tag|changed - "'newtag' in listoftags.stdout_lines" + # This test fails on osx. + # Skipping it here so the remaining tests can be enabled. + when: '{{ ansible_distribution != "MacOSX" }}' - name: clear checkout_dir diff --git a/test/integration/targets/iterators/aliases b/test/integration/targets/iterators/aliases index c364b48f38..7af8b7f05b 100644 --- a/test/integration/targets/iterators/aliases +++ b/test/integration/targets/iterators/aliases @@ -1,2 +1 @@ posix/ci/group2 -skip/osx diff --git a/test/integration/targets/iterators/tasks/main.yml b/test/integration/targets/iterators/tasks/main.yml index e42707753b..7e25b7b78c 100644 --- a/test/integration/targets/iterators/tasks/main.yml +++ b/test/integration/targets/iterators/tasks/main.yml @@ -193,10 +193,10 @@ - "{{ output_dir + '/bar1' }}" - name: set expected - set_fact: first_expected="{{ output_dir | expanduser + '/foo1' }}" + set_fact: first_expected="{{ output_dir | expanduser | realpath + '/foo1' }}" - name: set unexpected - set_fact: first_unexpected="{{ output_dir | expanduser + '/bar1' }}" + set_fact: first_unexpected="{{ output_dir | expanduser | realpath + '/bar1' }}" - name: verify with_first_found results assert: diff --git a/test/integration/targets/prepare_http_tests/defaults/main.yml b/test/integration/targets/prepare_http_tests/defaults/main.yml index 1114729623..a1e5b8d10d 100644 --- a/test/integration/targets/prepare_http_tests/defaults/main.yml +++ b/test/integration/targets/prepare_http_tests/defaults/main.yml @@ -1,4 +1,4 @@ badssl_host: wrong.host.badssl.com httpbin_host: httpbin.org -sni_host: sni.velox.ch +sni_host: ci-files.testing.ansible.com badssl_host_substring: wrong.host.badssl.com diff --git a/test/integration/targets/uri/aliases b/test/integration/targets/uri/aliases index 5d97a9be5e..8e7d715f9c 100644 --- a/test/integration/targets/uri/aliases +++ b/test/integration/targets/uri/aliases @@ -1,4 +1,2 @@ destructive posix/ci/group1 -skip/freebsd -skip/osx diff --git a/test/integration/targets/uri/vars/main.yml b/test/integration/targets/uri/vars/main.yml index b819276f65..b404a14a28 100644 --- a/test/integration/targets/uri/vars/main.yml +++ b/test/integration/targets/uri/vars/main.yml @@ -7,8 +7,3 @@ uri_os_packages: - python-pyasn1 - python-openssl - python-urllib3 - -# Needs to be a url to a site that is hosted using SNI. -# Eventually we should make this a test server that we stand up as part of the test run. -#SNI_URI: 'https://sni.velox.ch' -SNI_URI: "https://www.mnot.net/blog/2014/05/09/if_you_can_read_this_youre_sniing"