summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-05-18 16:18:32 +0000
committerGerrit Code Review <review@openstack.org>2020-05-18 16:18:32 +0000
commite0ce22551b901a096c5fea18f5f3053e14f4f96c (patch)
tree6e4b353e38fc2b2ce3f526de3d78bc93e019a86e /tests
parent55414a5b15319b45880e8267f94d96f330aabc35 (diff)
parent4728382a8ea43a4994808c05fe14edf3558e3754 (diff)
downloadzuul-e0ce22551b901a096c5fea18f5f3053e14f4f96c.tar.gz
Merge "Drop support for ansible 2.6"
Diffstat (limited to 'tests')
-rw-r--r--tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml12
-rw-r--r--tests/fixtures/zuul-default-ansible-version.conf2
-rw-r--r--tests/remote/test_remote_action_modules.py26
-rw-r--r--tests/remote/test_remote_zuul_json.py17
-rw-r--r--tests/remote/test_remote_zuul_stream.py20
-rw-r--r--tests/unit/test_v3.py6
6 files changed, 47 insertions, 36 deletions
diff --git a/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml b/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml
index 8e8c7f619..488e41a5c 100644
--- a/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml
+++ b/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml
@@ -34,15 +34,7 @@
parent: ansible-version
vars:
test_ansible_version_major: 2
- test_ansible_version_minor: 6
-
-- job:
- name: ansible-26
- parent: ansible-version
- ansible-version: 2.6
- vars:
- test_ansible_version_major: 2
- test_ansible_version_minor: 6
+ test_ansible_version_minor: 7
- job:
name: ansible-27
@@ -74,7 +66,6 @@
check:
jobs:
- ansible-default
- - ansible-26
- ansible-27
- ansible-28
- ansible-29
@@ -84,7 +75,6 @@
check:
jobs:
- ansible-default-zuul-conf
- - ansible-26
- ansible-27
- ansible-28
- ansible-29
diff --git a/tests/fixtures/zuul-default-ansible-version.conf b/tests/fixtures/zuul-default-ansible-version.conf
index 3a63ad892..caecb38ef 100644
--- a/tests/fixtures/zuul-default-ansible-version.conf
+++ b/tests/fixtures/zuul-default-ansible-version.conf
@@ -9,7 +9,7 @@ server=127.0.0.1
[scheduler]
tenant_config=main.yaml
relative_priority=true
-default_ansible_version=2.6
+default_ansible_version=2.7
[merger]
git_dir=/tmp/zuul-test/merger-git
diff --git a/tests/remote/test_remote_action_modules.py b/tests/remote/test_remote_action_modules.py
index 744b7659f..b3a0803ee 100644
--- a/tests/remote/test_remote_action_modules.py
+++ b/tests/remote/test_remote_action_modules.py
@@ -23,12 +23,12 @@ ERROR_SYNC_FROM_OUTSIDE = "Syncing files from outside the working dir"
ERROR_SYNC_RSH = "Using custom synchronize rsh is prohibited"
-class TestActionModules26(AnsibleZuulTestCase):
+class FunctionalActionModulesMixIn:
tenant_config_file = 'config/remote-action-modules/main.yaml'
- ansible_version = '2.6'
+ # This should be overriden in child classes.
+ ansible_version = '2.9'
- def setUp(self):
- super().setUp()
+ def _setUp(self):
self.fake_nodepool.remote_ansible = True
ansible_remote = os.environ.get('ZUUL_REMOTE_IPV4')
@@ -218,13 +218,25 @@ class TestActionModules26(AnsibleZuulTestCase):
self._run_job('known-hosts-bad', 'FAILURE', ERROR_ACCESS_OUTSIDE)
-class TestActionModules27(TestActionModules26):
+class TestActionModules27(AnsibleZuulTestCase, FunctionalActionModulesMixIn):
ansible_version = '2.7'
+ def setUp(self):
+ super().setUp()
+ self._setUp()
+
-class TestActionModules28(TestActionModules27):
+class TestActionModules28(AnsibleZuulTestCase, FunctionalActionModulesMixIn):
ansible_version = '2.8'
+ def setUp(self):
+ super().setUp()
+ self._setUp()
+
-class TestActionModules29(TestActionModules28):
+class TestActionModules29(AnsibleZuulTestCase, FunctionalActionModulesMixIn):
ansible_version = '2.9'
+
+ def setUp(self):
+ super().setUp()
+ self._setUp()
diff --git a/tests/remote/test_remote_zuul_json.py b/tests/remote/test_remote_zuul_json.py
index 744b2bbf3..e93f3f119 100644
--- a/tests/remote/test_remote_zuul_json.py
+++ b/tests/remote/test_remote_zuul_json.py
@@ -20,12 +20,11 @@ import textwrap
from tests.base import AnsibleZuulTestCase
-class TestZuulJSON26(AnsibleZuulTestCase):
+class FunctionalZuulJSONMixIn:
tenant_config_file = 'config/remote-zuul-json/main.yaml'
ansible_version = '2.6'
- def setUp(self):
- super().setUp()
+ def _setUp(self):
self.fake_nodepool.remote_ansible = True
ansible_remote = os.environ.get('ZUUL_REMOTE_IPV4')
@@ -144,13 +143,21 @@ class TestZuulJSON26(AnsibleZuulTestCase):
dateutil.parser.parse(play_end_time)
-class TestZuulJSON27(TestZuulJSON26):
+class TestZuulJSON27(AnsibleZuulTestCase, FunctionalZuulJSONMixIn):
ansible_version = '2.7'
+ def setUp(self):
+ super().setUp()
+ self._setUp()
+
-class TestZuulJSON28(TestZuulJSON27):
+class TestZuulJSON28(AnsibleZuulTestCase, FunctionalZuulJSONMixIn):
ansible_version = '2.8'
+ def setUp(self):
+ super().setUp()
+ self._setUp()
+
def test_json_task_action(self):
job = self._run_job('no-log')
with self.jobLog(job):
diff --git a/tests/remote/test_remote_zuul_stream.py b/tests/remote/test_remote_zuul_stream.py
index 76392c73f..9ac7b32b0 100644
--- a/tests/remote/test_remote_zuul_stream.py
+++ b/tests/remote/test_remote_zuul_stream.py
@@ -19,13 +19,13 @@ import textwrap
from tests.base import AnsibleZuulTestCase
-class TestZuulStream26(AnsibleZuulTestCase):
+class FunctionalZuulStreamMixIn:
tenant_config_file = 'config/remote-zuul-stream/main.yaml'
- ansible_version = '2.6'
+ # This should be overriden in child classes.
+ ansible_version = '2.9'
- def setUp(self):
+ def _setUp(self):
self.log_console_port = 19000 + int(self.ansible_version.split('.')[1])
- super().setUp()
self.fake_nodepool.remote_ansible = True
ansible_remote = os.environ.get('ZUUL_REMOTE_IPV4')
@@ -192,13 +192,21 @@ class TestZuulStream26(AnsibleZuulTestCase):
self.assertLogLine(regex, text)
-class TestZuulStream27(TestZuulStream26):
+class TestZuulStream27(AnsibleZuulTestCase, FunctionalZuulStreamMixIn):
ansible_version = '2.7'
+ def setUp(self):
+ super().setUp()
+ self._setUp()
-class TestZuulStream28(TestZuulStream27):
+
+class TestZuulStream28(AnsibleZuulTestCase, FunctionalZuulStreamMixIn):
ansible_version = '2.8'
+ def setUp(self):
+ super().setUp()
+ self._setUp()
+
def test_command(self):
job = self._run_job('command')
with self.jobLog(job):
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py
index a80675544..dee13417b 100644
--- a/tests/unit/test_v3.py
+++ b/tests/unit/test_v3.py
@@ -2849,10 +2849,6 @@ class FunctionalAnsibleMixIn(object):
self._test_plugins(plugin_tests)
-class TestAnsible26(AnsibleZuulTestCase, FunctionalAnsibleMixIn):
- ansible_version = '2.6'
-
-
class TestAnsible27(AnsibleZuulTestCase, FunctionalAnsibleMixIn):
ansible_version = '2.7'
@@ -6487,7 +6483,6 @@ class TestAnsibleVersion(AnsibleZuulTestCase):
self.assertHistory([
dict(name='ansible-default', result='SUCCESS', changes='1,1'),
- dict(name='ansible-26', result='SUCCESS', changes='1,1'),
dict(name='ansible-27', result='SUCCESS', changes='1,1'),
dict(name='ansible-28', result='SUCCESS', changes='1,1'),
dict(name='ansible-29', result='SUCCESS', changes='1,1'),
@@ -6509,7 +6504,6 @@ class TestDefaultAnsibleVersion(AnsibleZuulTestCase):
self.assertHistory([
dict(name='ansible-default-zuul-conf', result='SUCCESS',
changes='1,1'),
- dict(name='ansible-26', result='SUCCESS', changes='1,1'),
dict(name='ansible-27', result='SUCCESS', changes='1,1'),
dict(name='ansible-28', result='SUCCESS', changes='1,1'),
dict(name='ansible-29', result='SUCCESS', changes='1,1'),