Merge "Move Octavia tests to scenario tests"
diff --git a/heat_tempest_plugin/common/test.py b/heat_tempest_plugin/common/test.py
index 429d4ae..34ab24e 100644
--- a/heat_tempest_plugin/common/test.py
+++ b/heat_tempest_plugin/common/test.py
@@ -257,7 +257,7 @@
     def is_service_available(self, service_type):
         try:
             self.identity_client.get_endpoint_url(
-                service_type, self.conf.region)
+                service_type, self.conf.region, self.conf.endpoint_type)
         except kc_exceptions.EndpointNotFound:
             return False
         else:
diff --git a/heat_tempest_plugin/services/clients.py b/heat_tempest_plugin/services/clients.py
index 3999cee..d6e1dfb 100644
--- a/heat_tempest_plugin/services/clients.py
+++ b/heat_tempest_plugin/services/clients.py
@@ -111,7 +111,7 @@
             self.HEATCLIENT_VERSION,
             endpoint,
             session=session,
-            endpoint_type='publicURL',
+            endpoint_type=self.conf.endpoint_type,
             service_type='orchestration',
             region_name=self.conf.region,
             username=self._username(),
@@ -174,6 +174,8 @@
         args = {
             'auth_version': self.auth_version,
             'session': self.identity_client.session,
+            'cacert': self.ca_file,
+            'insecure': self.insecure,
             'os_options': {'endpoint_type': self.conf.endpoint_type,
                            'region_name': self.conf.region,
                            'service_type': 'object-store'},
diff --git a/heat_tempest_plugin/tests/functional/test_remote_stack.py b/heat_tempest_plugin/tests/functional/test_remote_stack.py
index 5e778e7..1a467f4 100644
--- a/heat_tempest_plugin/tests/functional/test_remote_stack.py
+++ b/heat_tempest_plugin/tests/functional/test_remote_stack.py
@@ -94,9 +94,10 @@
         ex = self.assertRaises(exc.HTTPBadRequest, self.stack_create, **kwargs)
 
         error_msg = ('ERROR: Cannot establish connection to Heat endpoint '
-                     'at region "DARKHOLE" due to "publicURL endpoint for '
+                     'at region "DARKHOLE" due to '
+                     '"(?:public|internal|admin)(?:URL)? endpoint for '
                      'orchestration service in DARKHOLE region not found"')
-        self.assertEqual(error_msg, six.text_type(ex))
+        self.assertRegex(six.text_type(ex), error_msg)
 
     @decorators.idempotent_id('b2190dfc-d223-4595-b168-6c42b0f3a3e5')
     def test_stack_resource_validation_fail(self):
diff --git a/heat_tempest_plugin/tests/functional/test_waitcondition.py b/heat_tempest_plugin/tests/functional/test_waitcondition.py
index b50c0a2..c21b33b 100644
--- a/heat_tempest_plugin/tests/functional/test_waitcondition.py
+++ b/heat_tempest_plugin/tests/functional/test_waitcondition.py
@@ -54,7 +54,7 @@
             password=signal['password'],
             project_id=signal['project_id'])
         endpoint = ks.service_catalog.url_for(
-            service_type='messaging', endpoint_type='publicURL')
+            service_type='messaging', endpoint_type=self.conf.endpoint_type)
         conf = {
             'auth_opts': {
                 'backend': 'keystone',