Merge lp:~marcoceppi/charms/trusty/mysql/fix-testing into lp:charms/trusty/mysql

Proposed by Marco Ceppi
Status: Merged
Merged at revision: 149
Proposed branch: lp:~marcoceppi/charms/trusty/mysql/fix-testing
Merge into: lp:charms/trusty/mysql
Diff against target: 102 lines (+24/-16)
6 files modified
hooks/common.py (+1/-1)
tests/019-basic-vivid-kilo (+0/-9)
tests/basic_deployment.py (+11/-3)
tests/broken-on-local-019-basic-vivid-kilo (+9/-0)
tests/charmhelpers/contrib/openstack/amulet/utils.py (+1/-3)
tests/tests.yaml (+2/-0)
To merge this branch: bzr merge lp:~marcoceppi/charms/trusty/mysql/fix-testing
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+272261@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

This fixes testing for Charm CI, kicking off this merge to see what OSCI says about the change.

The majority of these patches need to land in the upstream charms, this is just a workaround until that happens.

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #9862 mysql for marcoceppi mp272261
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/9862/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #10680 mysql for marcoceppi mp272261
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/10680/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #6719 mysql for marcoceppi mp272261
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 124
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12543146/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6719/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #6737 mysql for marcoceppi mp272261
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/6737/

150. By Marco Ceppi

vivid containers in Juju are broken atm

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/common.py'
2--- hooks/common.py 2015-02-25 17:10:21 +0000
3+++ hooks/common.py 2015-09-24 21:29:04 +0000
4@@ -95,7 +95,7 @@
5 raise RuntimeError('Persistent storage contains old data. '
6 'Please investigate and migrate data manually '
7 'to: {}'.format(new_path))
8- os.chmod(new_path, 0700)
9+ os.chmod(new_path, 0o700)
10 if os.path.isdir('/etc/apparmor.d/local'):
11 render('apparmor.j2', '/etc/apparmor.d/local/usr.sbin.mysqld',
12 context={'path': os.path.join(new_path, '')})
13
14=== removed file 'tests/019-basic-vivid-kilo'
15--- tests/019-basic-vivid-kilo 2015-06-30 21:51:50 +0000
16+++ tests/019-basic-vivid-kilo 1970-01-01 00:00:00 +0000
17@@ -1,9 +0,0 @@
18-#!/usr/bin/python
19-
20-"""Amulet tests on a basic mysql deployment on vivid-kilo."""
21-
22-from basic_deployment import MySQLBasicDeployment
23-
24-if __name__ == '__main__':
25- deployment = MySQLBasicDeployment(series='vivid')
26- deployment.run_tests()
27
28=== modified file 'tests/basic_deployment.py'
29--- tests/basic_deployment.py 2015-07-02 03:19:28 +0000
30+++ tests/basic_deployment.py 2015-09-24 21:29:04 +0000
31@@ -42,6 +42,8 @@
32 other_services = [{'name': 'keystone'}]
33 super(MySQLBasicDeployment, self)._add_services(this_service,
34 other_services)
35+ self.d.expose('keystone')
36+ self.d.expose('mysql')
37
38 def _add_relations(self):
39 """Add all of the relations for the services."""
40@@ -62,9 +64,15 @@
41 def _initialize_tests(self):
42 """Perform final initialization before tests get run."""
43 # Access the sentries for inspecting service units
44- self.mysql_sentry = self.d.sentry.unit['mysql/0']
45- self.keystone_sentry = self.d.sentry.unit['keystone/0']
46+ self.mysql_sentry = self.d.sentry['mysql'][0]
47+ self.keystone_sentry = self.d.sentry['keystone'][0]
48
49+ self.keystone_sentry.run('open-port 5000')
50+ self.keystone_sentry.run('open-port 35357')
51+ self.keystone_sentry.run('open-port 8888')
52+ self.keystone_sentry.run('open-port 35347')
53+ self.keystone_sentry.run('open-port 4990')
54+ self.mysql_sentry.run('open-port 3306')
55 # Authenticate keystone admin
56 self.keystone = u.authenticate_keystone_admin(self.keystone_sentry,
57 user='admin',
58@@ -108,7 +116,7 @@
59 unit = self.mysql_sentry
60 relation = ['shared-db', 'keystone:shared-db']
61 expected_data = {
62- 'allowed_units': 'keystone/0',
63+ 'allowed_units': self.keystone_sentry.info['unit_name'],
64 'private-address': u.valid_ip,
65 'password': u.not_null,
66 'db_host': u.valid_ip
67
68=== added file 'tests/broken-on-local-019-basic-vivid-kilo'
69--- tests/broken-on-local-019-basic-vivid-kilo 1970-01-01 00:00:00 +0000
70+++ tests/broken-on-local-019-basic-vivid-kilo 2015-09-24 21:29:04 +0000
71@@ -0,0 +1,9 @@
72+#!/usr/bin/python
73+
74+"""Amulet tests on a basic mysql deployment on vivid-kilo."""
75+
76+from basic_deployment import MySQLBasicDeployment
77+
78+if __name__ == '__main__':
79+ deployment = MySQLBasicDeployment(series='vivid')
80+ deployment.run_tests()
81
82=== modified file 'tests/charmhelpers/contrib/openstack/amulet/utils.py'
83--- tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-06-30 21:55:14 +0000
84+++ tests/charmhelpers/contrib/openstack/amulet/utils.py 2015-09-24 21:29:04 +0000
85@@ -189,9 +189,7 @@
86 tenant):
87 """Authenticates admin user with the keystone admin endpoint."""
88 self.log.debug('Authenticating keystone admin...')
89- unit = keystone_sentry
90- service_ip = unit.relation('shared-db',
91- 'mysql:shared-db')['private-address']
92+ service_ip = keystone_sentry.info['public-address']
93 ep = "http://{}:35357/v2.0".format(service_ip.strip().decode('utf-8'))
94 return keystone_client.Client(username=user, password=password,
95 tenant_name=tenant, auth_url=ep)
96
97=== added file 'tests/tests.yaml'
98--- tests/tests.yaml 1970-01-01 00:00:00 +0000
99+++ tests/tests.yaml 2015-09-24 21:29:04 +0000
100@@ -0,0 +1,2 @@
101+# tests: "0([0-9]+)-((setup|configs)|basic-(precise|trusty)-(icehouse|juno|kilo))"
102+tests: "0*"

Subscribers

People subscribed via source and target branches

to all changes: