~psivaa/uci-engine/lander-jenkins-sub-charm-with-plugin

« back to all changes in this revision

Viewing changes to tests/image_builder/test.py

  • Committer: Andy Doan
  • Date: 2014-04-04 16:00:36 UTC
  • mfrom: (422 uci-engine)
  • mto: This revision was merged to the branch mainline in revision 423.
  • Revision ID: andy.doan@canonical.com-20140404160036-cve1123qiu8o7dvf
merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
            },
44
44
            'ppa_list': ['ppa:fakeproject/test'],
45
45
            'package_list': ['fakepackage'],
46
 
            'progress_trigger': 'triggername'
 
46
            'progress_trigger': 'triggername',
 
47
            'ticket_id': 'ticket-1',
 
48
            'cancel_url': 'http://bar.baz/cancel'
47
49
        }
48
50
        resp, content = self.post_build_image(body)
49
51
        self.assertEqual('204', resp['status'])
59
61
        resp, content = self.get_status()
60
62
        self.assertEqual('200', resp['status'])
61
63
        data = json.loads(content)
62
 
        self.assertEqual(True, data['rabbit_configured'])
 
64
        self.assertEqual([{'label': 'rabbit configured', 'status': 'okay',
 
65
                           'value': True},
 
66
                          {'label': 'workers-online', 'status': 'okay',
 
67
                           'value': 1}],
 
68
                         data)
63
69
 
64
70
    def test_worker_running(self):
65
71
        '''ensure the rabbit worker is deployed and running'''
66
72
        self.assert_job_running('imagebuild_worker', 'imagebuild-worker')
67
73
 
 
74
 
68
75
if __name__ == "__main__":
69
76
    unittest.main()