diff --git a/shippable.yml b/shippable.yml index ce3c06fb7f..5db39c52d1 100644 --- a/shippable.yml +++ b/shippable.yml @@ -121,27 +121,6 @@ matrix: - env: T=fallaxy/2.7/1 - env: T=fallaxy/3.6/1 - - env: T=i/aix/7.2 - - env: T=i/osx/10.11 - - env: T=i/rhel/7.6 - - env: T=i/rhel/8.1 - - env: T=i/freebsd/11.1 - - env: T=i/freebsd/12.1 - - env: T=i/linux/centos6 - - env: T=i/linux/centos7 - - env: T=i/linux/centos8 - - env: T=i/linux/fedora30 - - env: T=i/linux/fedora31 - - env: T=i/linux/opensuse15py2 - - env: T=i/linux/opensuse15 - - env: T=i/linux/ubuntu1604 - - env: T=i/linux/ubuntu1804 - - - env: T=i/cs//1 - - env: T=i/tower//1 - - env: T=i/cloud//1 - - env: T=i/hcloud//1 - - env: T=cs/2.7/1 - env: T=cs/3.6/1 @@ -154,12 +133,6 @@ matrix: - env: T=cloud/2.7/1 - env: T=cloud/3.6/1 - - env: T=hcloud/2.7/1 - - env: T=hcloud/3.6/1 - - - env: T=hcloud/2.7/2 - - env: T=hcloud/3.6/2 - branches: except: - "*-patch-*" diff --git a/tests/integration/targets/apache2_module/tasks/actualtest.yml b/tests/integration/targets/apache2_module/tasks/actualtest.yml index d780e92caa..03d1914efb 100644 --- a/tests/integration/targets/apache2_module/tasks/actualtest.yml +++ b/tests/integration/targets/apache2_module/tasks/actualtest.yml @@ -23,7 +23,7 @@ - libapache2-mod-evasive - name: install apache via zypper - package: + zypper: name: apache2 state: present when: "ansible_os_family == 'Suse'" diff --git a/tests/integration/targets/callback_log_plays/runme.sh b/tests/integration/targets/callback_log_plays/runme.sh index 059f8976ef..abcaae378c 100755 --- a/tests/integration/targets/callback_log_plays/runme.sh +++ b/tests/integration/targets/callback_log_plays/runme.sh @@ -2,7 +2,7 @@ set -eux -export ANSIBLE_CALLBACK_WHITELIST="log_plays,${ANSIBLE_CALLBACK_WHITELIST:-}" +export ANSIBLE_CALLBACK_WHITELIST="community.general.log_plays,${ANSIBLE_CALLBACK_WHITELIST:-}" # run play, should create log and dir if needed export ANSIBLE_LOG_FOLDER="logit" diff --git a/tests/integration/targets/cloud_init_data_facts/aliases b/tests/integration/targets/cloud_init_data_facts/aliases index e93cd86b56..db81969f35 100644 --- a/tests/integration/targets/cloud_init_data_facts/aliases +++ b/tests/integration/targets/cloud_init_data_facts/aliases @@ -3,3 +3,4 @@ shippable/posix/group1 skip/aix skip/osx skip/freebsd +disabled #fixme diff --git a/tests/integration/targets/connection_chroot/aliases b/tests/integration/targets/connection_chroot/aliases index bd318e6146..6a0591c038 100644 --- a/tests/integration/targets/connection_chroot/aliases +++ b/tests/integration/targets/connection_chroot/aliases @@ -1,2 +1,3 @@ needs/root shippable/posix/group3 +disabled #fixme diff --git a/tests/integration/targets/filter_json_query/tasks/main.yml b/tests/integration/targets/filter_json_query/tasks/main.yml index 02ad2f87ec..e49b014a2f 100644 --- a/tests/integration/targets/filter_json_query/tasks/main.yml +++ b/tests/integration/targets/filter_json_query/tasks/main.yml @@ -1,4 +1,4 @@ - name: Test json_query filter assert: that: - - "users | json_query('[*].hosts[].host') == ['host_a', 'host_b', 'host_c', 'host_d']" + - "users | community.general.json_query('[*].hosts[].host') == ['host_a', 'host_b', 'host_c', 'host_d']" diff --git a/tests/integration/targets/filter_random_mac/aliases b/tests/integration/targets/filter_random_mac/aliases index 1603f4351b..fe3a893139 100644 --- a/tests/integration/targets/filter_random_mac/aliases +++ b/tests/integration/targets/filter_random_mac/aliases @@ -1,3 +1,4 @@ shippable/posix/group2 skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller skip/aix +disabled # fixme diff --git a/tests/integration/targets/filter_random_mac/tasks/main.yml b/tests/integration/targets/filter_random_mac/tasks/main.yml index 3c90127262..c652fd52bf 100644 --- a/tests/integration/targets/filter_random_mac/tasks/main.yml +++ b/tests/integration/targets/filter_random_mac/tasks/main.yml @@ -8,7 +8,7 @@ - name: Test random_mac filter bad argument type debug: - var: "0 | random_mac" + var: "0 | community.general.random_mac" register: _bad_random_mac_filter ignore_errors: yes @@ -20,7 +20,7 @@ - name: Test random_mac filter bad argument value debug: - var: "'dummy' | random_mac" + var: "'dummy' | community.generalrandom_mac" register: _bad_random_mac_filter ignore_errors: yes @@ -32,7 +32,7 @@ - name: Test random_mac filter prefix too big debug: - var: "'00:00:00:00:00:00' | random_mac" + var: "'00:00:00:00:00:00' | community.general.random_mac" register: _bad_random_mac_filter ignore_errors: yes @@ -55,5 +55,5 @@ - name: Verify random_mac filter with seed assert: that: - - "'00:00:00' | random_mac(seed='test') == '00:00:00' | random_mac(seed='test')" - - "'00:00:00' | random_mac(seed='test') != '00:00:00' | random_mac(seed='another_test')" + - "'00:00:00' | communit.general.random_mac(seed='test') == '00:00:00' | random_mac(seed='test')" + - "'00:00:00' | community.general.random_mac(seed='test') != '00:00:00' | random_mac(seed='another_test')" diff --git a/tests/integration/targets/lookup_hashi_vault/aliases b/tests/integration/targets/lookup_hashi_vault/aliases index d3acfde9f7..b50140faf0 100644 --- a/tests/integration/targets/lookup_hashi_vault/aliases +++ b/tests/integration/targets/lookup_hashi_vault/aliases @@ -1,6 +1,6 @@ shippable/posix/group2 destructive needs/target/setup_openssl -needs/file/test/lib/ansible_test/_data/requirements/constraints.txt +needs/file/tests/utils/constraints.txt skip/aix skip/python2.6 # lookups are controller only, and we no longer support Python 2.6 on the controller diff --git a/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/approle_test.yml b/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/approle_test.yml index 44eb5ed18d..d943f90846 100644 --- a/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/approle_test.yml +++ b/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/approle_test.yml @@ -4,7 +4,7 @@ block: - name: 'Fetch secrets using "hashi_vault" lookup' set_fact: - secret1: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret1 auth_method=approle secret_id=' ~ secret_id ~ ' role_id=' ~ role_id) }}" + secret1: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret1 auth_method=approle secret_id=' ~ secret_id ~ ' role_id=' ~ role_id) }}" secret2: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret2 auth_method=approle secret_id=' ~ secret_id ~ ' role_id=' ~ role_id) }}" - name: 'Check secret values' @@ -14,7 +14,7 @@ - name: 'Failure expected when erroneous credentials are used' vars: - secret_wrong_cred: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret2 auth_method=approle secret_id=toto role_id=' ~ role_id) }}" + secret_wrong_cred: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret2 auth_method=approle secret_id=toto role_id=' ~ role_id) }}" debug: msg: 'Failure is expected ({{ secret_wrong_cred }})' register: test_wrong_cred @@ -22,7 +22,7 @@ - name: 'Failure expected when unauthorized secret is read' vars: - secret_unauthorized: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret3 auth_method=approle secret_id=' ~ secret_id ~ ' role_id=' ~ role_id) }}" + secret_unauthorized: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret3 auth_method=approle secret_id=' ~ secret_id ~ ' role_id=' ~ role_id) }}" debug: msg: 'Failure is expected ({{ secret_unauthorized }})' register: test_unauthorized @@ -30,7 +30,7 @@ - name: 'Failure expected when inexistent secret is read' vars: - secret_inexistent: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret4 auth_method=approle secret_id=' ~ secret_id ~ ' role_id=' ~ role_id) }}" + secret_inexistent: "{{ lookup('community.general.:qhashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret4 auth_method=approle secret_id=' ~ secret_id ~ ' role_id=' ~ role_id) }}" debug: msg: 'Failure is expected ({{ secret_inexistent }})' register: test_inexistent diff --git a/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/token_test.yml b/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/token_test.yml index 20c1af791e..542284517e 100644 --- a/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/token_test.yml +++ b/tests/integration/targets/lookup_hashi_vault/lookup_hashi_vault/tasks/token_test.yml @@ -3,12 +3,12 @@ block: - name: 'Fetch secrets using "hashi_vault" lookup' set_fact: - gen_secret1: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_gen_path ~ '/secret1 auth_method=token token=' ~ user_token) }}" - gen_secret2: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_gen_path ~ '/secret2 token=' ~ user_token) }}" - kv1_secret1: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv1_path ~ '/secret1 auth_method=token token=' ~ user_token) }}" - kv1_secret2: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv1_path ~ '/secret2 token=' ~ user_token) }}" - kv2_secret1: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret1 auth_method=token token=' ~ user_token) }}" - kv2_secret2: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret2 token=' ~ user_token) }}" + gen_secret1: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_gen_path ~ '/secret1 auth_method=token token=' ~ user_token) }}" + gen_secret2: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_gen_path ~ '/secret2 token=' ~ user_token) }}" + kv1_secret1: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv1_path ~ '/secret1 auth_method=token token=' ~ user_token) }}" + kv1_secret2: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv1_path ~ '/secret2 token=' ~ user_token) }}" + kv2_secret1: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret1 auth_method=token token=' ~ user_token) }}" + kv2_secret2: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret2 token=' ~ user_token) }}" - name: 'Check secret generic values' fail: @@ -27,7 +27,7 @@ - name: 'Failure expected when erroneous credentials are used' vars: - secret_wrong_cred: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret2 auth_method=token token=wrong_token') }}" + secret_wrong_cred: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret2 auth_method=token token=wrong_token') }}" debug: msg: 'Failure is expected ({{ secret_wrong_cred }})' register: test_wrong_cred @@ -35,7 +35,7 @@ - name: 'Failure expected when unauthorized secret is read' vars: - secret_unauthorized: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret3 token=' ~ user_token) }}" + secret_unauthorized: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret3 token=' ~ user_token) }}" debug: msg: 'Failure is expected ({{ secret_unauthorized }})' register: test_unauthorized @@ -43,7 +43,7 @@ - name: 'Failure expected when inexistent secret is read' vars: - secret_inexistent: "{{ lookup('hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret4 token=' ~ user_token) }}" + secret_inexistent: "{{ lookup('community.general.hashi_vault', conn_params ~ 'secret=' ~ vault_kv2_path ~ '/secret4 token=' ~ user_token) }}" debug: msg: 'Failure is expected ({{ secret_inexistent }})' register: test_inexistent diff --git a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml index 50937f7da2..dc913fa956 100644 --- a/tests/integration/targets/lookup_passwordstore/tasks/tests.yml +++ b/tests/integration/targets/lookup_passwordstore/tasks/tests.yml @@ -37,11 +37,11 @@ - name: Create a password set_fact: - newpass: "{{ lookup('passwordstore', 'test-pass length=8 create=yes') }}" + newpass: "{{ lookup('community.general.passwordstore', 'test-pass length=8 create=yes') }}" - name: Fetch password from an existing file set_fact: - readpass: "{{ lookup('passwordstore', 'test-pass') }}" + readpass: "{{ lookup('community.general.passwordstore', 'test-pass') }}" - name: Verify password assert: diff --git a/tests/integration/targets/postgresql_ext/tasks/postgresql_ext_initial.yml b/tests/integration/targets/postgresql_ext/tasks/postgresql_ext_initial.yml index c7a59dcc0b..0a672dad0a 100644 --- a/tests/integration/targets/postgresql_ext/tasks/postgresql_ext_initial.yml +++ b/tests/integration/targets/postgresql_ext/tasks/postgresql_ext_initial.yml @@ -1,7 +1,7 @@ -- name: postgresql_ext - install postgis +- name: postgresql_ext - install postgis on Linux package: name=postgis state=present when: ansible_os_family != "Windows" -- name: postgresql_ext - install postgis RedHat +- name: postgresql_ext - install postgis on Windows when: ansible_os_family == "Windows" ansible.windows.win_package: name=postgis state=present - name: postgresql_ext - create schema schema1 diff --git a/tests/integration/targets/script_inventory_foreman/aliases b/tests/integration/targets/script_inventory_foreman/aliases index 236bb0768d..a965d6e836 100644 --- a/tests/integration/targets/script_inventory_foreman/aliases +++ b/tests/integration/targets/script_inventory_foreman/aliases @@ -1,3 +1,3 @@ shippable/cloud/group1 cloud/foreman -needs/file/contrib/inventory/foreman.py +needs/file/scripts/inventory/foreman.py diff --git a/tests/integration/targets/script_inventory_foreman/foreman.sh b/tests/integration/targets/script_inventory_foreman/foreman.sh index 18e9e153f8..1b3e70fb1a 100644 --- a/tests/integration/targets/script_inventory_foreman/foreman.sh +++ b/tests/integration/targets/script_inventory_foreman/foreman.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Wrapper to use the correct Python interpreter and support code coverage. -REL_SCRIPT="../../../../contrib/inventory/foreman.py" +REL_SCRIPT="../../../../scripts/inventory/foreman.py" ABS_SCRIPT="$("${ANSIBLE_TEST_PYTHON_INTERPRETER}" -c "import os; print(os.path.abspath('${REL_SCRIPT}'))")" # Make sure output written to current directory ends up in the temp dir. diff --git a/tests/integration/targets/setup_remote_constraints/aliases b/tests/integration/targets/setup_remote_constraints/aliases index 18cc100a5e..1ad133ba0a 100644 --- a/tests/integration/targets/setup_remote_constraints/aliases +++ b/tests/integration/targets/setup_remote_constraints/aliases @@ -1 +1 @@ -needs/file/test/lib/ansible_test/_data/requirements/constraints.txt +needs/file/tests/utils/constraints.txt diff --git a/tests/integration/targets/setup_remote_constraints/tasks/main.yml b/tests/integration/targets/setup_remote_constraints/tasks/main.yml index eee09ccf64..d19d929ad1 100644 --- a/tests/integration/targets/setup_remote_constraints/tasks/main.yml +++ b/tests/integration/targets/setup_remote_constraints/tasks/main.yml @@ -4,5 +4,5 @@ - name: copy constraints.txt to remote host copy: - src: "{{ role_path }}/../../../lib/ansible_test/_data/requirements/constraints.txt" + src: "{{ role_path }}/../../../utils/constraints.txt" dest: "{{ remote_constraints }}" diff --git a/tests/integration/targets/xfs_quota/aliases b/tests/integration/targets/xfs_quota/aliases index 493c64f48f..445d9b8769 100644 --- a/tests/integration/targets/xfs_quota/aliases +++ b/tests/integration/targets/xfs_quota/aliases @@ -4,3 +4,4 @@ shippable/posix/group1 skip/aix skip/osx skip/freebsd +disabled #fixme diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt new file mode 100644 index 0000000000..b96d623cd1 --- /dev/null +++ b/tests/utils/constraints.txt @@ -0,0 +1,51 @@ +coverage >= 4.2, < 5.0.0, != 4.3.2 ; python_version <= '3.7' # features in 4.2+ required, avoid known bug in 4.3.2 on python 2.6, coverage 5.0+ incompatible +coverage >= 4.5.4, < 5.0.0 ; python_version > '3.7' # coverage had a bug in < 4.5.4 that would cause unit tests to hang in Python 3.8, coverage 5.0+ incompatible +cryptography < 2.2 ; python_version < '2.7' # cryptography 2.2 drops support for python 2.6 +deepdiff < 4.0.0 ; python_version < '3' # deepdiff 4.0.0 and later require python 3 +jinja2 < 2.11 ; python_version < '2.7' # jinja2 2.11 and later require python 2.7 or later +urllib3 < 1.24 ; python_version < '2.7' # urllib3 1.24 and later require python 2.7 or later +pywinrm >= 0.3.0 # message encryption support +sphinx < 1.6 ; python_version < '2.7' # sphinx 1.6 and later require python 2.7 or later +sphinx < 1.8 ; python_version >= '2.7' # sphinx 1.8 and later are currently incompatible with rstcheck 3.3 +pygments >= 2.4.0 # Pygments 2.4.0 includes bugfixes for YAML and YAML+Jinja lexers +wheel < 0.30.0 ; python_version < '2.7' # wheel 0.30.0 and later require python 2.7 or later +yamllint != 1.8.0, < 1.14.0 ; python_version < '2.7' # yamllint 1.8.0 and 1.14.0+ require python 2.7+ +pycrypto >= 2.6 # Need features found in 2.6 and greater +ncclient >= 0.5.2 # Need features added in 0.5.2 and greater +idna < 2.6, >= 2.5 # linode requires idna < 2.9, >= 2.5, requests requires idna < 2.6, but cryptography will cause the latest version to be installed instead +paramiko < 2.4.0 ; python_version < '2.7' # paramiko 2.4.0 drops support for python 2.6 +pytest < 3.3.0 ; python_version < '2.7' # pytest 3.3.0 drops support for python 2.6 +pytest < 5.0.0 ; python_version == '2.7' # pytest 5.0.0 and later will no longer support python 2.7 +pytest-forked < 1.0.2 ; python_version < '2.7' # pytest-forked 1.0.2 and later require python 2.7 or later +pytest-forked >= 1.0.2 ; python_version >= '2.7' # pytest-forked before 1.0.2 does not work with pytest 4.2.0+ (which requires python 2.7+) +ntlm-auth >= 1.3.0 # message encryption support using cryptography +requests < 2.20.0 ; python_version < '2.7' # requests 2.20.0 drops support for python 2.6 +requests-ntlm >= 1.1.0 # message encryption support +requests-credssp >= 0.1.0 # message encryption support +voluptuous >= 0.11.0 # Schema recursion via Self +openshift >= 0.6.2, < 0.9.0 # merge_type support +virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later +pathspec < 0.6.0 ; python_version < '2.7' # pathspec 0.6.0 and later require python 2.7 or later +pyopenssl < 18.0.0 ; python_version < '2.7' # pyOpenSSL 18.0.0 and later require python 2.7 or later +pyfmg == 0.6.1 # newer versions do not pass current unit tests +pyyaml < 5.1 ; python_version < '2.7' # pyyaml 5.1 and later require python 2.7 or later +pycparser < 2.19 ; python_version < '2.7' # pycparser 2.19 and later require python 2.7 or later +mock >= 2.0.0 # needed for features backported from Python 3.6 unittest.mock (assert_called, assert_called_once...) +pytest-mock >= 1.4.0 # needed for mock_use_standalone_module pytest option +xmltodict < 0.12.0 ; python_version < '2.7' # xmltodict 0.12.0 and later require python 2.7 or later +lxml < 4.3.0 ; python_version < '2.7' # lxml 4.3.0 and later require python 2.7 or later +pyvmomi < 6.0.0 ; python_version < '2.7' # pyvmomi 6.0.0 and later require python 2.7 or later +pyone == 1.1.9 # newer versions do not pass current integration tests +boto3 < 1.11 ; python_version < '2.7' # boto3 1.11 drops Python 2.6 support +botocore >= 1.10.0, < 1.14 ; python_version < '2.7' # adds support for the following AWS services: secretsmanager, fms, and acm-pca; botocore 1.14 drops Python 2.6 support +botocore >= 1.10.0 ; python_version >= '2.7' # adds support for the following AWS services: secretsmanager, fms, and acm-pca +setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later + +# freeze pylint and its requirements for consistent test results +astroid == 2.2.5 +isort == 4.3.15 +lazy-object-proxy == 1.3.1 +mccabe == 0.6.1 +pylint == 2.3.1 +typed-ast == 1.4.0 # 1.4.0 is required to compile on Python 3.8 +wrapt == 1.11.1 diff --git a/tests/utils/shippable/shippable.sh b/tests/utils/shippable/shippable.sh index 1acf4cadd1..82ca6def51 100755 --- a/tests/utils/shippable/shippable.sh +++ b/tests/utils/shippable/shippable.sh @@ -77,7 +77,7 @@ set -ux pip install git+https://github.com/ansible/ansible.git@temp-2.10-devel --disable-pip-version-check COLLECTION_DIR="${HOME}/.ansible/ansible_collections/" -TEST_DIR="${COLLECTION_DIR}/ansible/posix" +TEST_DIR="${COLLECTION_DIR}/community/general" mkdir -p "${TEST_DIR}" cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}" cd "${TEST_DIR}"