diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 091efc31..bc484bf9 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -6,7 +6,8 @@ # - stable-2.13 (3.8, 3.9, 3.10) # - stable-2.14 (3.9, 3.10, 3.11) # - stable-2.15 (3.9, 3.10, 3.11) -# - devel (3.10) +# - stable-2.16 (3.10, 3.11, 3.12) +# - devel (3.11) # # As Ansible's devel version is unstable, it should be considered a smoke signal # for the next released version. Failures against the devel version should not @@ -47,8 +48,14 @@ jobs: python: '3.11' - ansible: stable-2.15 python: '3.11' - - ansible: devel + - ansible: stable-2.16 python: '3.10' + - ansible: stable-2.16 + python: '3.11' + - ansible: stable-2.16 + python: '3.12' + - ansible: devel + python: '3.11' runs-on: ubuntu-latest steps: @@ -104,8 +111,14 @@ jobs: python: '3.11' - ansible: stable-2.15 python: '3.11' - - ansible: devel + - ansible: stable-2.16 python: '3.10' + - ansible: stable-2.16 + python: '3.11' + - ansible: stable-2.16 + python: '3.12' + - ansible: devel + python: '3.11' runs-on: ubuntu-latest steps: - name: Check out code diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt new file mode 100644 index 00000000..b57dd581 --- /dev/null +++ b/tests/sanity/ignore-2.16.txt @@ -0,0 +1,4 @@ +Jenkinsfile shebang +plugins/lookup/conjur_variable.py validate-modules:version-added-must-be-major-or-minor +dev/policy/root.yml yamllint:unparsable-with-libyaml # File loaded by Conjur server, not via Python +secrets.yml yamllint:unparsable-with-libyaml # File loaded by Summon, not via Python diff --git a/tests/unit/plugins/lookup/test_conjur_variable.py b/tests/unit/plugins/lookup/test_conjur_variable.py index c78704e8..27963a11 100644 --- a/tests/unit/plugins/lookup/test_conjur_variable.py +++ b/tests/unit/plugins/lookup/test_conjur_variable.py @@ -27,15 +27,15 @@ def test_merge_dictionaries(self): {}, {'id': 'host/ansible/ansible-fake', 'api_key': 'fakekey'} ) - self.assertEquals(MockMergeDictionaries.RESPONSE, functionOutput) + self.assertEqual(MockMergeDictionaries.RESPONSE, functionOutput) def test_load_identity_from_file(self): load_identity = _load_identity_from_file("/etc/conjur.identity", "https://conjur-fake") - self.assertEquals(MockFileload.RESPONSE, load_identity) + self.assertEqual(MockFileload.RESPONSE, load_identity) def test_load_conf_from_file(self): load_conf = _load_conf_from_file("/etc/conjur.conf") - self.assertEquals(MockFileload.RESPONSE, load_conf) + self.assertEqual(MockFileload.RESPONSE, load_conf) @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable.open_url') def test_fetch_conjur_token(self, mock_open_url): @@ -49,7 +49,7 @@ def test_fetch_conjur_token(self, mock_open_url): method="POST", validate_certs=True, ca_path="cert_file") - self.assertEquals("response body", result) + self.assertEqual("response body", result) @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._repeat_open_url') def test_fetch_conjur_variable(self, mock_repeat_open_url): @@ -63,7 +63,7 @@ def test_fetch_conjur_variable(self, mock_repeat_open_url): method="GET", validate_certs=True, ca_path="cert_file") - self.assertEquals(['response body'], result) + self.assertEqual(['response body'], result) @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_variable') @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_token') @@ -80,7 +80,7 @@ def test_run(self, mock_merge_dictionaries, mock_fetch_conjur_token, mock_fetch_ kwargs = {'as_file': False, 'conf_file': 'conf_file', 'validate_certs': False} result = self.lookup.run(terms, **kwargs) - self.assertEquals(result, ["conjur_variable"]) + self.assertEqual(result, ["conjur_variable"]) @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_variable') @patch('ansible_collections.cyberark.conjur.plugins.lookup.conjur_variable._fetch_conjur_token')