mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
[stable-1] Update CI (#1790)
* Update CI (#1782) * Update targets for CI for devel branch; move some targets to stable-2.10. * Skipping test on RHEL 8.3 (it is already skipped on RHEL 8.2). * Linting. * Shut 2.9/2.10 pylint complaints up. * More sanity. * Bump CI to FreeBSD 11.4, 12.2. (#1657) * Bump CI to FreeBSD 11.4, 12.2. * Make FreeBSD Python package selection more future-proof. (cherry picked from commitc1eb0a232c) * Add macOS 11.1 tests (#1619) * Add macOS 11.1 tests. * Hopefully fix virtualenv.sh problems. (cherry picked from commit74174f11ff) * Skip all postgresql tests on FreeBSD. * Skip kubevirt inventory tests on macOS.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
set -eux
|
||||
|
||||
export ANSIBLE_TEST_PREFER_VENV=1 # see https://github.com/ansible/ansible/pull/73000#issuecomment-757012395; can be removed once Ansible 2.9 and ansible-base 2.10 support has been dropped
|
||||
source virtualenv.sh
|
||||
|
||||
# Requirements have to be installed prior to running ansible-playbook
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
set -eux
|
||||
|
||||
export ANSIBLE_TEST_PREFER_VENV=1 # see https://github.com/ansible/ansible/pull/73000#issuecomment-757012395; can be removed once Ansible 2.9 and ansible-base 2.10 support has been dropped
|
||||
source virtualenv.sh
|
||||
|
||||
# Requirements have to be installed prior to running ansible-playbook
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
shippable/posix/group2
|
||||
skip/macos
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -4,3 +4,4 @@ postgresql_db
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group5
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -3,3 +3,4 @@ shippable/posix/group4
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pyopenssl_package_name: py27-openssl
|
||||
pyopenssl_package_name_python3: py36-openssl
|
||||
pyopenssl_package_name_python3: "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-openssl"
|
||||
openssl_package_name: openssl
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
postgresql_packages:
|
||||
- postgresql95-server
|
||||
- py36-psycopg2
|
||||
- "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2"
|
||||
|
||||
pg_dir: /usr/local/pgsql/data
|
||||
pg_hba_location: "{{ pg_dir }}/pg_hba.conf"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
postgresql_packages:
|
||||
- postgresql95-server
|
||||
- py36-psycopg2
|
||||
- "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2"
|
||||
|
||||
pg_dir: /usr/local/pgsql/data
|
||||
pg_hba_location: "{{ pg_dir }}/pg_hba.conf"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
postgresql_packages:
|
||||
- postgresql11-server
|
||||
- py36-psycopg2
|
||||
- "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2"
|
||||
|
||||
pg_dir: /var/db/postgres/data11
|
||||
pg_hba_location: "{{ pg_dir }}/pg_hba.conf"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
- name: Install lxml (FreeBSD)
|
||||
package:
|
||||
name: '{{ "py27-lxml" if ansible_python.version.major == 2 else "py36-lxml" }}'
|
||||
name: 'py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-lxml'
|
||||
state: present
|
||||
when: ansible_os_family == "FreeBSD"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins/callback/hipchat.py pylint:blacklisted-name
|
||||
plugins/connection/lxc.py pylint:blacklisted-name
|
||||
plugins/module_utils/cloud.py pylint:bad-option-value # a pylint test that is disabled was modified over time
|
||||
plugins/module_utils/compat/ipaddress.py no-assert
|
||||
plugins/module_utils/compat/ipaddress.py no-unicode-literals
|
||||
plugins/module_utils/_mount.py future-import-boilerplate
|
||||
@@ -552,6 +553,7 @@ plugins/modules/system/xfconf.py validate-modules:return-syntax-error
|
||||
plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path
|
||||
plugins/modules/web_infrastructure/rundeck_acl_policy.py pylint:blacklisted-name
|
||||
scripts/inventory/gce.py pylint:blacklisted-name
|
||||
tests/unit/plugins/module_utils/postgresql/test_postgres.py pylint:bad-option-value # a pylint test that is disabled was modified over time
|
||||
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate
|
||||
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate
|
||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||
|
||||
@@ -14,29 +14,18 @@ plugins/modules/cloud/centurylink/clc_server.py validate-modules:parameter-list-
|
||||
plugins/modules/cloud/centurylink/clc_server_snapshot.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/docker/docker_container.py use-argspec-type-path # uses colon-separated paths, can't use type=path
|
||||
plugins/modules/cloud/google/gcdns_record.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce.py yamllint:unparsable-with-libyaml
|
||||
plugins/modules/cloud/google/gce_eip.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_eip.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_img.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_instance_template.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_instance_template.py validate-modules:doc-missing-type
|
||||
plugins/modules/cloud/google/gce_instance_template.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_labels.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_lb.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_lb.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_mig.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_mig.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_net.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_net.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_pd.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_pd.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_snapshot.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_snapshot.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gce_tag.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gce_tag.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gcp_backend_service.py pylint:blacklisted-name
|
||||
plugins/modules/cloud/google/gcp_backend_service.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gcp_forwarding_rule.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/cloud/google/gcp_healthcheck.py pylint:blacklisted-name
|
||||
@@ -551,7 +540,6 @@ plugins/modules/system/xfconf.py validate-modules:parameter-state-invalid-choice
|
||||
plugins/modules/system/xfconf.py validate-modules:return-syntax-error
|
||||
plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path
|
||||
plugins/modules/web_infrastructure/rundeck_acl_policy.py pylint:blacklisted-name
|
||||
scripts/inventory/gce.py pylint:blacklisted-name
|
||||
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate
|
||||
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate
|
||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins/callback/hipchat.py pylint:blacklisted-name
|
||||
plugins/connection/lxc.py pylint:blacklisted-name
|
||||
plugins/module_utils/cloud.py pylint:bad-option-value # a pylint test that is disabled was modified over time
|
||||
plugins/module_utils/compat/ipaddress.py no-assert
|
||||
plugins/module_utils/compat/ipaddress.py no-unicode-literals
|
||||
plugins/module_utils/_mount.py future-import-boilerplate
|
||||
@@ -482,6 +483,7 @@ plugins/modules/web_infrastructure/nginx_status_facts.py validate-modules:deprec
|
||||
plugins/modules/web_infrastructure/nginx_status_facts.py validate-modules:invalid-documentation
|
||||
plugins/modules/web_infrastructure/rundeck_acl_policy.py pylint:blacklisted-name
|
||||
scripts/inventory/gce.py pylint:blacklisted-name
|
||||
tests/unit/plugins/module_utils/postgresql/test_postgres.py pylint:bad-option-value # a pylint test that is disabled was modified over time
|
||||
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate
|
||||
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate
|
||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||
|
||||
@@ -225,8 +225,8 @@ class TestConnectToDb():
|
||||
db_connection = pg.connect_to_db(m_ansible_module, conn_params)
|
||||
cursor = db_connection.cursor()
|
||||
# if errors, db_connection returned as None:
|
||||
assert isinstance(db_connection, DbConnection)
|
||||
assert isinstance(cursor, Cursor)
|
||||
assert isinstance(db_connection, DbConnection) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert isinstance(cursor, Cursor) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert m_ansible_module.err_msg == ''
|
||||
# The default behaviour, normal in this case:
|
||||
assert 'Database name has not been passed' in m_ansible_module.warn_msg
|
||||
@@ -241,8 +241,8 @@ class TestConnectToDb():
|
||||
db_connection = pg.connect_to_db(m_ansible_module, conn_params)
|
||||
cursor = db_connection.cursor()
|
||||
# if errors, db_connection returned as None:
|
||||
assert isinstance(db_connection, DbConnection)
|
||||
assert isinstance(cursor, Cursor)
|
||||
assert isinstance(db_connection, DbConnection) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert isinstance(cursor, Cursor) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert m_ansible_module.err_msg == ''
|
||||
# The default behaviour, normal in this case:
|
||||
assert 'Database name has not been passed' in m_ansible_module.warn_msg
|
||||
@@ -292,8 +292,8 @@ class TestConnectToDb():
|
||||
cursor = db_connection.cursor()
|
||||
|
||||
# if errors, db_connection returned as None:
|
||||
assert isinstance(db_connection, DbConnection)
|
||||
assert isinstance(cursor, Cursor)
|
||||
assert isinstance(db_connection, DbConnection) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert isinstance(cursor, Cursor) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert m_ansible_module.err_msg == ''
|
||||
|
||||
# case 2: psycopg2.__version < 2.4.2
|
||||
@@ -305,8 +305,8 @@ class TestConnectToDb():
|
||||
cursor = db_connection.cursor()
|
||||
|
||||
# if errors, db_connection returned as None:
|
||||
assert isinstance(db_connection, DbConnection)
|
||||
assert isinstance(cursor, Cursor)
|
||||
assert isinstance(db_connection, DbConnection) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert isinstance(cursor, Cursor) # pylint: disable=isinstance-second-argument-not-valid-type
|
||||
assert 'psycopg2 must be at least 2.4.3' in m_ansible_module.err_msg
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class MonitTest(unittest.TestCase):
|
||||
self.monit.wait_for_monit_to_stop_pending()
|
||||
|
||||
|
||||
@pytest.mark.parametrize('status_name', [name for name in monit.StatusValue.ALL_STATUS])
|
||||
@pytest.mark.parametrize('status_name', monit.StatusValue.ALL_STATUS)
|
||||
def test_status_value(status_name):
|
||||
value = getattr(monit.StatusValue, status_name.upper())
|
||||
status = monit.StatusValue(value)
|
||||
|
||||
@@ -60,7 +60,7 @@ class TestInterfacesFileModule(unittest.TestCase):
|
||||
tofile=os.path.basename(backup))
|
||||
# Restore backup
|
||||
move(backup, path)
|
||||
deltas = [d for d in diffs]
|
||||
deltas = list(diffs)
|
||||
self.assertTrue(len(deltas) == 0)
|
||||
|
||||
def compareInterfacesLinesToFile(self, interfaces_lines, path, testname=None):
|
||||
|
||||
Reference in New Issue
Block a user