Merge lp:~vila/uci-engine/1323498-fix-unit-renames into lp:uci-engine

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: 512
Merged at revision: 512
Proposed branch: lp:~vila/uci-engine/1323498-fix-unit-renames
Merge into: lp:uci-engine
Diff against target: 125 lines (+15/-11)
6 files modified
tests/test_image_builder.py (+3/-2)
tests/test_integration.py (+3/-2)
tests/test_juju_gui.py (+1/-1)
tests/test_ppa_assigner.py (+2/-2)
tests/test_test_runner.py (+2/-1)
tests/test_ticket_system.py (+4/-3)
To merge this branch: bzr merge lp:~vila/uci-engine/1323498-fix-unit-renames
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+221059@code.launchpad.net

Commit message

Fix test failures introduced while renaming the services in an IS compatible way.

Description of the change

This fixes the fallout from revno 506: tests were referring to the old service names without the introduced 'ci-airline-' prefix.

I'm waiting for a test run to complete but I think I've got all references fixed.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:512
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/707/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/707/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/test_image_builder.py'
--- tests/test_image_builder.py 2014-04-17 20:13:11 +0000
+++ tests/test_image_builder.py 2014-05-27 10:32:39 +0000
@@ -21,14 +21,15 @@
21import deployers21import deployers
2222
2323
24class TestTestRunner(deployers.DeployerTest):24class TestImageBuilder(deployers.DeployerTest):
25 """Integration tests for image builder service run on a juju deployment"""25 """Integration tests for image builder service run on a juju deployment"""
2626
27 deployer_cfg = 'image-builder.yaml'27 deployer_cfg = 'image-builder.yaml'
2828
29 def test_worker_running(self):29 def test_worker_running(self):
30 '''ensure the rabbit worker is deployed and running'''30 '''ensure the rabbit worker is deployed and running'''
31 self.assert_job_running('imagebuild_worker', 'imagebuild-worker')31 self.assert_job_running('ci_airline_imagebuild_worker',
32 'ci-airline-imagebuild-worker')
3233
3334
34if __name__ == "__main__":35if __name__ == "__main__":
3536
=== modified file 'tests/test_integration.py'
--- tests/test_integration.py 2014-05-07 14:41:07 +0000
+++ tests/test_integration.py 2014-05-27 10:32:39 +0000
@@ -72,7 +72,7 @@
72 args = '%s develop' % p72 args = '%s develop' % p
73 run_virtual_env(self.temp_dir, args)73 run_virtual_env(self.temp_dir, args)
74 config_url = 'http://{}'.format(74 config_url = 'http://{}'.format(
75 self.get_ip_and_port('webui-apache')[0])75 self.get_ip_and_port('ci-airline-webui-apache')[0])
76 config = os.path.join(os.environ["HOME"], '.ubuntu-ci')76 config = os.path.join(os.environ["HOME"], '.ubuntu-ci')
77 with open(config, 'a') as fp:77 with open(config, 'a') as fp:
78 fp.write('ci_url: "{}"\n'.format(config_url))78 fp.write('ci_url: "{}"\n'.format(config_url))
@@ -80,7 +80,8 @@
80 run_virtual_env(self.temp_dir, args='create')80 run_virtual_env(self.temp_dir, args='create')
81 self.addCleanup(delete_virtual_env, self.temp_dir)81 self.addCleanup(delete_virtual_env, self.temp_dir)
8282
83 def get_server_status_and_content(self, url, service='webui-apache'):83 def get_server_status_and_content(self, url,
84 service='ci-airline-webui-apache'):
84 final_url = url.format(self.get_ip_and_port(service)[0])85 final_url = url.format(self.get_ip_and_port(service)[0])
8586
86 client = httplib2.Http()87 client = httplib2.Http()
8788
=== modified file 'tests/test_juju_gui.py'
--- tests/test_juju_gui.py 2014-05-12 18:48:34 +0000
+++ tests/test_juju_gui.py 2014-05-27 10:32:39 +0000
@@ -29,7 +29,7 @@
29 def get_unit(self):29 def get_unit(self):
30 status = amulet.waiter.status(30 status = amulet.waiter.status(
31 self.deployer.deployment.juju_env)31 self.deployer.deployment.juju_env)
32 unit = status['services']['ci-juju-gui']['units'].values()[0]32 unit = status['services']['ci-airline-juju-gui']['units'].values()[0]
33 return unit33 return unit
3434
35 def test_juju_gui(self):35 def test_juju_gui(self):
3636
=== modified file 'tests/test_ppa_assigner.py'
--- tests/test_ppa_assigner.py 2014-04-16 18:36:03 +0000
+++ tests/test_ppa_assigner.py 2014-05-27 10:32:39 +0000
@@ -29,7 +29,7 @@
29 deployer_cfg = 'ppa-assigner.yaml'29 deployer_cfg = 'ppa-assigner.yaml'
3030
31 def get_server_status_and_content(self, url):31 def get_server_status_and_content(self, url):
32 final_url = url.format(*self.get_ip_and_port('ppa-django'))32 final_url = url.format(*self.get_ip_and_port('ci-airline-ppa-django'))
3333
34 # Issue a simple command against the ppa assigner API34 # Issue a simple command against the ppa assigner API
35 client = httplib2.Http()35 client = httplib2.Http()
@@ -39,7 +39,7 @@
3939
40 def reserve_ppa(self, ticket_id):40 def reserve_ppa(self, ticket_id):
41 url = 'http://{}:{}/api/v1/ppa/'41 url = 'http://{}:{}/api/v1/ppa/'
42 final_url = url.format(*self.get_ip_and_port('ppa-django'))42 final_url = url.format(*self.get_ip_and_port('ci-airline-ppa-django'))
4343
44 client = httplib2.Http()44 client = httplib2.Http()
45 resp, content = client.request(45 resp, content = client.request(
4646
=== modified file 'tests/test_test_runner.py'
--- tests/test_test_runner.py 2014-04-17 20:13:11 +0000
+++ tests/test_test_runner.py 2014-05-27 10:32:39 +0000
@@ -26,7 +26,8 @@
2626
27 def test_worker_running(self):27 def test_worker_running(self):
28 '''Ensure the rabbit worker is deployed and running.'''28 '''Ensure the rabbit worker is deployed and running.'''
29 self.assert_job_running('tr_rabbit_worker', 'tr-rabbit-worker')29 self.assert_job_running('ci_airline_tr_rabbit_worker',
30 'ci-airline-tr-rabbit-worker')
3031
3132
32if __name__ == "__main__":33if __name__ == "__main__":
3334
=== modified file 'tests/test_ticket_system.py'
--- tests/test_ticket_system.py 2014-05-26 12:51:46 +0000
+++ tests/test_ticket_system.py 2014-05-27 10:32:39 +0000
@@ -32,7 +32,7 @@
32 # Adding get_ip_and_port('ts-django') in order to allow the deployment32 # Adding get_ip_and_port('ts-django') in order to allow the deployment
33 # further time to settle before running the tests.33 # further time to settle before running the tests.
34 # http://pad.lv/131907734 # http://pad.lv/1319077
35 self.get_ip_and_port('ts-django')35 self.get_ip_and_port('ci-airline-ts-django')
3636
37 def get_server_status_and_content(self, url):37 def get_server_status_and_content(self, url):
38 final_url = url.format(self.get_ip_and_port('webui-apache')[0])38 final_url = url.format(self.get_ip_and_port('webui-apache')[0])
@@ -45,7 +45,8 @@
4545
46 def create_ticket(self, ticket_content):46 def create_ticket(self, ticket_content):
47 url = 'http://{}/api/v1/ticket/'47 url = 'http://{}/api/v1/ticket/'
48 final_url = url.format(self.get_ip_and_port('webui-apache')[0])48 final_url = url.format(
49 self.get_ip_and_port('ci-airline-webui-apache')[0])
4950
50 client = httplib2.Http()51 client = httplib2.Http()
51 resp, content = client.request(52 resp, content = client.request(
@@ -58,7 +59,7 @@
5859
59 def test_ticket_sys_api(self):60 def test_ticket_sys_api(self):
60 url = 'http://{}/api/v1/ticket'61 url = 'http://{}/api/v1/ticket'
61 self.get_ip_and_port('ts-django')62 self.get_ip_and_port('ci-airline-ts-django')
62 resp, content = self.get_server_status_and_content(url)63 resp, content = self.get_server_status_and_content(url)
6364
64 self.assertEqual('200', resp['status'])65 self.assertEqual('200', resp['status'])

Subscribers

People subscribed via source and target branches