~ubuntu-branches/ubuntu/trusty/ceilometer/trusty-proposed

« back to all changes in this revision

Viewing changes to ceilometer/tests/alarm/test_singleton_alarm_svc.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, James Page, Chuck Short
  • Date: 2014-01-23 15:08:11 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140123150811-1zaismsuyh1hcl8y
Tags: 2014.1~b2-0ubuntu1
[ James Page ]
* d/control: Add python-jsonpath-rw to BD's.
* d/p/fix-setup-requirements.patch: Bump WebOb to support < 1.4.
 (LP: #1261101)

[ Chuck Short ]
* New upstream version.
* debian/control, debian/ceilometer-common.install: Split out
  ceilometer-alarm-evaluator and ceilometer-alarm-notifier into their
  own packages. (LP: #1250002)
* debian/ceilometer-agent-central.logrotate,
  debian/ceilometer-agent-compute.logrotate,
  debian/ceilometer-api.logrotate,
  debian/ceilometer-collector.logrotate: Add logrotate files, 
  thanks to Ahmed Rahal. (LP: #1224223)
* Fix typos in upstart files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
            self.singleton.start()
84
84
            self.singleton._evaluate_assigned_alarms()
85
85
            self.threshold_eval.evaluate.assert_called_once_with(alarms[1])
 
86
 
 
87
    def test_singleton_endpoint_types(self):
 
88
        endpoint_types = ["internalURL", "publicURL"]
 
89
        for endpoint_type in endpoint_types:
 
90
            cfg.CONF.set_override('os_endpoint_type',
 
91
                                  endpoint_type,
 
92
                                  group='service_credentials')
 
93
            with mock.patch('ceilometerclient.client.get_client') as client:
 
94
                self.singleton.api_client = None
 
95
                self.singleton._evaluate_assigned_alarms()
 
96
                conf = cfg.CONF.service_credentials
 
97
                expected = [mock.call(2,
 
98
                                      os_auth_url=conf.os_auth_url,
 
99
                                      os_region_name=conf.os_region_name,
 
100
                                      os_tenant_name=conf.os_tenant_name,
 
101
                                      os_password=conf.os_password,
 
102
                                      os_username=conf.os_username,
 
103
                                      os_cacert=conf.os_cacert,
 
104
                                      os_endpoint_type=conf.os_endpoint_type)]
 
105
                actual = client.call_args_list
 
106
                self.assertEqual(actual, expected)