Merge "Create common stack_create functional test helper"
diff --git a/common/clients.py b/common/clients.py
index a0e2ee0..965b6ab 100644
--- a/common/clients.py
+++ b/common/clients.py
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import os
+
import cinderclient.client
import heatclient.client
import keystoneclient.exceptions
@@ -41,15 +43,20 @@
self.volume_client = self._get_volume_client()
def _get_orchestration_client(self):
- keystone = self._get_identity_client()
region = self.conf.region
- token = keystone.auth_token
+ endpoint = os.environ.get('HEAT_URL')
+ if os.environ.get('OS_NO_CLIENT_AUTH') == 'True':
+ token = None
+ else:
+ keystone = self._get_identity_client()
+ token = keystone.auth_token
try:
- endpoint = keystone.service_catalog.url_for(
- attr='region',
- filter_value=region,
- service_type='orchestration',
- endpoint_type='publicURL')
+ if endpoint is None:
+ endpoint = keystone.service_catalog.url_for(
+ attr='region',
+ filter_value=region,
+ service_type='orchestration',
+ endpoint_type='publicURL')
except keystoneclient.exceptions.EndpointNotFound:
return None
else:
diff --git a/common/test.py b/common/test.py
index 1278c86..43336a9 100644
--- a/common/test.py
+++ b/common/test.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import fixtures
import logging
import os
import random
@@ -28,6 +29,7 @@
from heat_integrationtests.common import remote_client
LOG = logging.getLogger(__name__)
+_LOG_FORMAT = "%(levelname)8s [%(name)s] %(message)s"
def call_until_true(func, duration, sleep_for):
@@ -81,6 +83,7 @@
self.compute_client = self.manager.compute_client
self.network_client = self.manager.network_client
self.volume_client = self.manager.volume_client
+ self.useFixture(fixtures.FakeLogger(format=_LOG_FORMAT))
def status_timeout(self, things, thing_id, expected_status,
error_status='ERROR',
diff --git a/scenario/test_volumes.py b/scenario/test_volumes.py
index a654f86..fe9ec03 100644
--- a/scenario/test_volumes.py
+++ b/scenario/test_volumes.py
@@ -12,7 +12,7 @@
import logging
import six
-from testtools.testcase import skip
+from testtools import testcase
from cinderclient import exceptions as cinder_exceptions
@@ -77,7 +77,8 @@
self._wait_for_stack_status(stack_identifier, 'CREATE_COMPLETE')
return stack, stack_identifier
- @skip('Skipped until failure rate can be reduced ref bug #1382300')
+ @testcase.skip('Skipped until failure rate '
+ 'can be reduced ref bug #1382300')
def test_cinder_volume_create_backup_restore(self):
"""Ensure the 'Snapshot' deletion policy works.