From 436b4baba95841e8002ccc05f1ff0b6aea6a08cf Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Tue, 14 May 2013 11:06:26 -0400 Subject: [PATCH] Fix config setting references in API tests These tests are being skipped in the CI system because we aren't installing Ming. I'm working on a separate patch to restore Ming to the dependency list for tests, and while preparing for that I found that these tests break when Ming is installed. Change-Id: I4604bbde0c92109b4e2a88f1492793d75c5c0e4d Signed-off-by: Doug Hellmann --- tests/api/v2/test_acl.py | 7 ++++--- tests/api/v2/test_list_resources.py | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tests/api/v2/test_acl.py b/tests/api/v2/test_acl.py index 284b451701..94ca7c31dd 100644 --- a/tests/api/v2/test_acl.py +++ b/tests/api/v2/test_acl.py @@ -98,9 +98,10 @@ class TestAPIACL(FunctionalTest): timestamp=datetime.datetime(2012, 7, 2, 10, 43), resource_metadata={'display_name': 'test-server', 'tag': 'self.counter4'})]: - msg = meter.meter_message_from_counter(cnt, - cfg.CONF.metering_secret, - 'test_source') + msg = meter.meter_message_from_counter( + cnt, + cfg.CONF.publisher_meter.metering_secret, + 'test_source') self.conn.record_metering_data(msg) def get_json(self, path, expect_errors=False, headers=None, diff --git a/tests/api/v2/test_list_resources.py b/tests/api/v2/test_list_resources.py index f542281bc4..ff45121db4 100644 --- a/tests/api/v2/test_list_resources.py +++ b/tests/api/v2/test_list_resources.py @@ -304,10 +304,11 @@ class TestListResources(FunctionalTest): 'tag': 'self.counter1', } ) - msg2 = meter.meter_message_from_counter(counter1, - cfg.CONF.metering_secret, - 'not-test', - ) + msg2 = meter.meter_message_from_counter( + counter1, + cfg.CONF.publisher_meter.metering_secret, + 'not-test', + ) self.conn.record_metering_data(msg2) data = self.get_json('/resources', @@ -330,10 +331,11 @@ class TestListResources(FunctionalTest): 'tag': 'self.counter1', } ) - msg2 = meter.meter_message_from_counter(counter1, - cfg.CONF.metering_secret, - 'not-test', - ) + msg2 = meter.meter_message_from_counter( + counter1, + cfg.CONF.publisher_meter.metering_secret, + 'not-test', + ) self.conn.record_metering_data(msg2) data = self.get_json('/resources',