Browse Source

Migrate charm-ceph-proxy testing to Zaza

Change-Id: If9e79b22a919997961a23929435450af0883b882
Closes-Bug: #1828424
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/5
changes/48/659548/3
Ramon Grullon 4 months ago
parent
commit
8e08a9c22a

+ 2
- 17
test-requirements.txt View File

@@ -7,23 +7,8 @@ mock>=1.2
7 7
 flake8>=2.2.4,<=2.4.1
8 8
 stestr>=2.2.0
9 9
 requests>=2.18.4
10
-# BEGIN: Amulet OpenStack Charm Helper Requirements
11
-# Liberty client lower constraints
12
-amulet>=1.14.3,<2.0;python_version=='2.7'
13
-bundletester>=0.6.1,<1.0;python_version=='2.7'
14
-python-ceilometerclient>=1.5.0
15
-python-cinderclient>=1.4.0
16
-python-glanceclient>=1.1.0
17
-python-heatclient>=0.8.0
18
-python-keystoneclient>=1.7.1
19
-python-neutronclient>=3.1.0
20
-python-novaclient>=2.30.1
21
-python-openstackclient>=1.7.0
22
-python-swiftclient>=2.6.0
23
-pika>=0.10.0,<1.0
24
-distro-info
25
-git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
26
-# END: Amulet OpenStack Charm Helper Requirements
27 10
 # NOTE: workaround for 14.04 pip/tox
28 11
 pytz
29 12
 pyudev  # for ceph-* charm unit tests (not mocked?)
13
+git+https://github.com/openstack-charmers/zaza.git@remove-namespaced-tests#egg=zaza;python_version>='3.0'
14
+git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack;python_version>='3.0'

+ 0
- 155
tests/basic_deployment.py View File

@@ -1,155 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-import amulet
4
-
5
-from charmhelpers.contrib.openstack.amulet.deployment import (
6
-    OpenStackAmuletDeployment
7
-)
8
-from charmhelpers.contrib.openstack.amulet.utils import (  # noqa
9
-    OpenStackAmuletUtils,
10
-    DEBUG,
11
-    # ERROR
12
-    )
13
-
14
-# Use DEBUG to turn on debug logging
15
-u = OpenStackAmuletUtils(DEBUG)
16
-
17
-
18
-class CephBasicDeployment(OpenStackAmuletDeployment):
19
-    """Amulet tests on a basic ceph deployment."""
20
-
21
-    def __init__(self, series=None, openstack=None, source=None, stable=False):
22
-        """Deploy the entire test environment."""
23
-        super(CephBasicDeployment, self).__init__(series, openstack, source,
24
-                                                  stable)
25
-        self._add_services()
26
-        self._add_relations()
27
-        self._configure_services()
28
-        self._deploy()
29
-
30
-        u.log.info('Waiting on extended status checks...')
31
-        exclude_services = ['ceph-proxy', 'ceph-radosgw']
32
-
33
-        # Wait for deployment ready msgs, except exclusions
34
-        self._auto_wait_for_status(exclude_services=exclude_services)
35
-
36
-        self._configure_proxy()
37
-        self.d.sentry.wait()
38
-        self._initialize_tests()
39
-        self._auto_wait_for_status()
40
-
41
-    def _add_services(self):
42
-        """Add services
43
-
44
-           Add the services that we're testing, where ceph is local,
45
-           and the rest of the service are from lp branches that are
46
-           compatible with the local charm (e.g. stable or next).
47
-           """
48
-        this_service = {'name': 'ceph-proxy'}
49
-        other_services = [{'name': 'ceph-mon', 'units': 3},
50
-                          {'name': 'ceph-osd', 'units': 3,
51
-                           'storage': {'osd-devices': 'cinder,10G'}},
52
-                          {'name': 'ceph-radosgw'}]
53
-        super(CephBasicDeployment, self)._add_services(this_service,
54
-                                                       other_services)
55
-
56
-    def _add_relations(self):
57
-        """Add all of the relations for the services."""
58
-        relations = {
59
-            'ceph-osd:mon': 'ceph-mon:osd',
60
-            'ceph-radosgw:mon': 'ceph-proxy:radosgw',
61
-        }
62
-        super(CephBasicDeployment, self)._add_relations(relations)
63
-
64
-    def _configure_services(self):
65
-        ceph_config = {
66
-            'monitor-count': '3',
67
-            'auth-supported': 'none',
68
-        }
69
-
70
-        # Include a non-existent device as osd-devices is a whitelist,
71
-        # and this will catch cases where proposals attempt to change that.
72
-        ceph_osd_config = {
73
-            'osd-devices': '/srv/ceph /dev/test-non-existent'
74
-        }
75
-
76
-        proxy_config = {
77
-            'source': self.source
78
-        }
79
-        configs = {'ceph-mon': ceph_config,
80
-                   'ceph-osd': ceph_osd_config,
81
-                   'ceph-proxy': proxy_config}
82
-        super(CephBasicDeployment, self)._configure_services(configs)
83
-
84
-    def _configure_proxy(self):
85
-        """Setup CephProxy with Ceph configuration
86
-        from running Ceph cluster
87
-        """
88
-        mon_key = u.file_contents_safe(
89
-            self.d.sentry['ceph-mon'][0],
90
-            '/etc/ceph/ceph.client.admin.keyring'
91
-        ).split(' = ')[-1].rstrip()
92
-
93
-        ceph_ips = []
94
-        for x in self.d.sentry['ceph-mon']:
95
-            output, code = x.run("unit-get private-address")
96
-            ceph_ips.append(output + ':6789')
97
-
98
-        proxy_config = {
99
-            'auth-supported': 'none',
100
-            'admin-key': mon_key,
101
-            'fsid': '6547bd3e-1397-11e2-82e5-53567c8d32dc',
102
-            'monitor-hosts': ' '.join(ceph_ips)
103
-        }
104
-        u.log.debug('Config: {}'.format(proxy_config))
105
-        self.d.configure('ceph-proxy', proxy_config)
106
-
107
-    def _initialize_tests(self):
108
-        """Perform final initialization before tests get run."""
109
-        # Access the sentries for inspecting service units
110
-        self.ceph_osd_sentry = self.d.sentry['ceph-osd'][0]
111
-        self.ceph0_sentry = self.d.sentry['ceph-mon'][0]
112
-        self.radosgw_sentry = self.d.sentry['ceph-radosgw'][0]
113
-        self.proxy_sentry = self.d.sentry['ceph-proxy'][0]
114
-
115
-        u.log.debug('openstack release val: {}'.format(
116
-            self._get_openstack_release()))
117
-        u.log.debug('openstack release str: {}'.format(
118
-            self._get_openstack_release_string()))
119
-
120
-    def test_100_ceph_processes(self):
121
-        """Verify that the expected service processes are running
122
-        on each ceph unit."""
123
-
124
-        # Process name and quantity of processes to expect on each unit
125
-        ceph_processes = {
126
-            'ceph-mon': 1,
127
-        }
128
-
129
-        # Units with process names and PID quantities expected
130
-        expected_processes = {
131
-            self.ceph0_sentry: ceph_processes
132
-        }
133
-
134
-        actual_pids = u.get_unit_process_ids(expected_processes)
135
-        ret = u.validate_unit_process_ids(expected_processes, actual_pids)
136
-        if ret:
137
-            amulet.raise_status(amulet.FAIL, msg=ret)
138
-
139
-    def test_499_ceph_cmds_exit_zero(self):
140
-        """Check basic functionality of ceph cli commands against
141
-        ceph proxy units."""
142
-        sentry_units = [
143
-            self.proxy_sentry,
144
-            self.ceph0_sentry
145
-        ]
146
-        commands = [
147
-            'sudo ceph health',
148
-            'sudo ceph mds stat',
149
-            'sudo ceph pg stat',
150
-            'sudo ceph osd stat',
151
-            'sudo ceph mon stat',
152
-        ]
153
-        ret = u.check_commands_on_units(commands, sentry_units)
154
-        if ret:
155
-            amulet.raise_status(amulet.FAIL, msg=ret)

+ 23
- 0
tests/bundles/bionic-queens.yaml View File

@@ -0,0 +1,23 @@
1
+series: bionic
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+  ceph-osd:
9
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
10
+    num_units: 3
11
+    storage:
12
+      osd-devices: 10G
13
+  ceph-proxy:
14
+    charm: 'ceph-proxy'
15
+    num_units: 1
16
+  ceph-radosgw:
17
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
18
+    num_units: 1
19
+relations:
20
+  - - 'ceph-osd:mon'
21
+    - 'ceph-mon:osd'
22
+  - - 'ceph-proxy:radosgw'
23
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/bionic-rocky.yaml View File

@@ -0,0 +1,30 @@
1
+series: bionic
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:bionic-rocky
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:bionic-rocky
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:bionic-rocky
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: cloud:bionic-rocky
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/bionic-stein.yaml View File

@@ -0,0 +1,30 @@
1
+series: bionic
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:bionic-stein
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:bionic-stein
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:bionic-stein
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: cloud:bionic-stein
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 26
- 0
tests/bundles/trusty-icehouse.yaml View File

@@ -0,0 +1,26 @@
1
+series: trusty
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+  ceph-osd:
9
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
10
+    num_units: 3
11
+    storage:
12
+      osd-devices: 10G
13
+    options:
14
+  ceph-proxy:
15
+    charm: 'ceph-proxy'
16
+    num_units: 1
17
+    options:
18
+  ceph-radosgw:
19
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
20
+    num_units: 1
21
+    options:
22
+relations:
23
+  - - 'ceph-osd:mon'
24
+    - 'ceph-mon:osd'
25
+  - - 'ceph-proxy:radosgw'
26
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/trusty-juno.yaml View File

@@ -0,0 +1,30 @@
1
+series: trusty
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:trusty-juno
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:trusty-juno
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:trusty-juno
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: cloud:trusty-juno
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/trusty-kilo.yaml View File

@@ -0,0 +1,30 @@
1
+series: trusty
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:trusty-kilo
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:trusty-kilo
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:trusty-kilo
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: cloud:trusty-kilo
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/trusty-liberty.yaml View File

@@ -0,0 +1,30 @@
1
+series: trusty
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:trusty-liberty
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:trusty-liberty
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:trusty-liberty
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: cloud:trusty-liberty
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/trusty-mitaka.yaml View File

@@ -0,0 +1,30 @@
1
+series: trusty
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:trusty-mitaka
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:trusty-mitaka
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:trusty-mitaka
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: trusty-mitaka
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 26
- 0
tests/bundles/xenial-mitaka.yaml View File

@@ -0,0 +1,26 @@
1
+series: xenial
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+  ceph-osd:
9
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
10
+    num_units: 3
11
+    storage:
12
+      osd-devices: 10G
13
+    options:
14
+  ceph-proxy:
15
+    charm: 'ceph-proxy'
16
+    num_units: 1
17
+    options:
18
+  ceph-radosgw:
19
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
20
+    num_units: 1
21
+    options:
22
+relations:
23
+  - - 'ceph-osd:mon'
24
+    - 'ceph-mon:osd'
25
+  - - 'ceph-proxy:radosgw'
26
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/xenial-newton.yaml View File

@@ -0,0 +1,30 @@
1
+series: xenial
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:xenial-newton
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:xenial-newton
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:xenial-newton
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: cloud:xenial-newton
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/xenial-ocata.yaml View File

@@ -0,0 +1,30 @@
1
+series: xenial
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:xenial-ocata
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:xenial-ocata
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:xenial-ocata
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: xenial-ocata
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/xenial-pike.yaml View File

@@ -0,0 +1,30 @@
1
+series: bionic
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:xenial-pike
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:xenial-pike
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:xenial-pike
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: xenial-pike
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 30
- 0
tests/bundles/xenial-queens.yaml View File

@@ -0,0 +1,30 @@
1
+series: xenial
2
+applications:
3
+  ceph-mon:
4
+    charm: 'cs:~openstack-charmers-next/ceph-mon'
5
+    num_units: 3
6
+    options:
7
+      expected-osd-count: 3
8
+      source: cloud:xenial-queens
9
+  ceph-osd:
10
+    charm: 'cs:~openstack-charmers-next/ceph-osd'
11
+    num_units: 3
12
+    storage:
13
+      osd-devices: 10G
14
+    options:
15
+      source: cloud:xenial-queens
16
+  ceph-proxy:
17
+    charm: 'ceph-proxy'
18
+    num_units: 1
19
+    options:
20
+      source: cloud:xenial-queens
21
+  ceph-radosgw:
22
+    charm: 'cs:~openstack-charmers-next/ceph-radosgw'
23
+    num_units: 1
24
+    options:
25
+      source: xenial-queens
26
+relations:
27
+  - - 'ceph-osd:mon'
28
+    - 'ceph-mon:osd'
29
+  - - 'ceph-proxy:radosgw'
30
+    - 'ceph-radosgw:mon'

+ 0
- 9
tests/dev-basic-cosmic-rocky View File

@@ -1,9 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on cosmic-rocky."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='cosmic')
9
-    deployment.run_tests()

+ 0
- 9
tests/dev-basic-disco-stein View File

@@ -1,9 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on disco-stein."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='disco')
9
-    deployment.run_tests()

+ 0
- 9
tests/gate-basic-bionic-queens View File

@@ -1,9 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on bionic-queens."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='bionic')
9
-    deployment.run_tests()

+ 0
- 11
tests/gate-basic-bionic-rocky View File

@@ -1,11 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on bionic-rocky."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='bionic',
9
-                                     openstack='cloud:bionic-rocky',
10
-                                     source='cloud:bionic-updates/rocky')
11
-    deployment.run_tests()

+ 0
- 11
tests/gate-basic-bionic-stein View File

@@ -1,11 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on bionic-stein."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='bionic',
9
-                                     openstack='cloud:bionic-stein',
10
-                                     source='cloud:bionic-stein')
11
-    deployment.run_tests()

+ 0
- 11
tests/gate-basic-trusty-mitaka View File

@@ -1,11 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on trusty-mitaka."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='trusty',
9
-                                     openstack='cloud:trusty-mitaka',
10
-                                     source='cloud:trusty-updates/mitaka')
11
-    deployment.run_tests()

+ 0
- 9
tests/gate-basic-xenial-mitaka View File

@@ -1,9 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on xenial-mitaka."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='xenial')
9
-    deployment.run_tests()

+ 0
- 11
tests/gate-basic-xenial-ocata View File

@@ -1,11 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on xenial-ocata."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='xenial',
9
-                                     openstack='cloud:xenial-ocata',
10
-                                     source='cloud:xenial-updates/ocata')
11
-    deployment.run_tests()

+ 0
- 11
tests/gate-basic-xenial-pike View File

@@ -1,11 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on xenial-pike."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='xenial',
9
-                                     openstack='cloud:xenial-pike',
10
-                                     source='cloud:xenial-updates/pike')
11
-    deployment.run_tests()

+ 0
- 11
tests/gate-basic-xenial-queens View File

@@ -1,11 +0,0 @@
1
-#!/usr/bin/env python
2
-
3
-"""Amulet tests on a basic ceph deployment on xenial-queens."""
4
-
5
-from basic_deployment import CephBasicDeployment
6
-
7
-if __name__ == '__main__':
8
-    deployment = CephBasicDeployment(series='xenial',
9
-                                     openstack='cloud:xenial-queens',
10
-                                     source='cloud:xenial-updates/queens')
11
-    deployment.run_tests()

+ 38
- 18
tests/tests.yaml View File

@@ -1,18 +1,38 @@
1
-# Bootstrap the model if necessary.
2
-bootstrap: True
3
-# Re-use bootstrap node.
4
-reset: True
5
-# Use tox/requirements to drive the venv instead of bundletester's venv feature.
6
-virtualenv: False
7
-# Leave makefile empty, otherwise unit/lint tests will rerun ahead of amulet.
8
-makefile: []
9
-# Do not specify juju PPA sources.  Juju is presumed to be pre-installed
10
-# and configured in all test runner environments.
11
-#sources:
12
-# Do not specify or rely on system packages.
13
-#packages:
14
-# Do not specify python packages here.  Use test-requirements.txt
15
-# and tox instead.  ie. The venv is constructed before bundletester
16
-# is invoked.
17
-#python-packages:
18
-reset_timeout: 600
1
+configure:
2
+  - zaza.openstack.configure.ceph_proxy.setup_ceph_proxy
3
+
4
+tests:
5
+  - zaza.openstack.charm_tests.ceph.tests.CephProxyTest
6
+
7
+gate_bundles:
8
+  - trusty-mitaka # jewel
9
+  - xenial-mitaka # jewel
10
+  - xenial-queens # luminous
11
+  - bionic-queens # luminous
12
+  - bionic-rocky  # mimic
13
+dev_bundles:
14
+  # Icehouse
15
+  - trusty-icehouse
16
+  - trusty-juno
17
+  # Hammer
18
+  - trusty-kilo
19
+  - trusty-liberty
20
+  # Jewel
21
+  - xenial-newton
22
+  - xenial-ocata
23
+  # Pike
24
+  - xenial-pike
25
+  # Mimic
26
+  - bionic-stein
27
+
28
+smoke_bundles:
29
+  - bionic-queens
30
+
31
+target_deploy_status:
32
+  ceph-proxy:
33
+    workload-status: blocked
34
+    workload-status-message: Ensure FSID and admin-key are set
35
+  ceph-radosgw:
36
+    workload-status: blocked
37
+    workload-status-message: "Missing relations: mon"
38
+

+ 14
- 41
tox.ini View File

@@ -15,6 +15,8 @@ install_command =
15 15
 commands = stestr run {posargs}
16 16
 whitelist_externals = juju
17 17
 passenv = HOME TERM AMULET_* CS_API_*
18
+deps = -r{toxinidir}/requirements.txt
19
+       -r{toxinidir}/test-requirements.txt
18 20
 
19 21
 [testenv:py27]
20 22
 basepython = python2.7
@@ -43,50 +45,21 @@ commands = flake8 {posargs} hooks unit_tests tests actions lib
43 45
 basepython = python3
44 46
 commands = {posargs}
45 47
 
46
-[testenv:func27-noop]
47
-# DRY RUN - For Debug
48
-basepython = python2.7
49
-deps = -r{toxinidir}/requirements.txt
50
-       -r{toxinidir}/test-requirements.txt
51
-commands =
52
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy
53
-
54
-[testenv:func27]
55
-# Charm Functional Test
56
-# Run all gate tests which are +x (expected to always pass)
57
-basepython = python2.7
58
-deps = -r{toxinidir}/requirements.txt
59
-       -r{toxinidir}/test-requirements.txt
60
-commands =
61
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy
48
+[flake8]
49
+ignore = E402,E226
50
+exclude = */charmhelpers
62 51
 
63
-[testenv:func27-smoke]
64
-# Charm Functional Test
65
-# Run a specific test as an Amulet smoke test (expected to always pass)
66
-basepython = python2.7
67
-deps = -r{toxinidir}/requirements.txt
68
-       -r{toxinidir}/test-requirements.txt
52
+[testenv:func]
53
+basepython = python3
69 54
 commands =
70
-    bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-queens --no-destroy
55
+    functest-run-suite --keep-model
71 56
 
72
-[testenv:func27-dfs]
73
-# Charm Functional Test
74
-# Run all deploy-from-source tests which are +x (may not always pass!)
75
-basepython = python2.7
76
-deps = -r{toxinidir}/requirements.txt
77
-       -r{toxinidir}/test-requirements.txt
57
+[testenv:func-smoke]
58
+basepython = python3
78 59
 commands =
79
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy
60
+    functest-run-suite --keep-model --smoke
80 61
 
81
-[testenv:func27-dev]
82
-# Charm Functional Test
83
-# Run all development test targets which are +x (may not always pass!)
84
-basepython = python2.7
85
-deps = -r{toxinidir}/requirements.txt
86
-       -r{toxinidir}/test-requirements.txt
62
+[testenv:func-dev]
63
+basepython = python3
87 64
 commands =
88
-    bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
89
-
90
-[flake8]
91
-ignore = E402,E226
92
-exclude = */charmhelpers
65
+    functest-run-suite --keep-model --dev

Loading…
Cancel
Save