Skip tests when heat is unavailable

Currently the [service_available] heat parameter is not actually used
and the plugin tests are always executed regardless of availability
of Heat service.

This change ensures that the parameter is honored so that users can
disable plugin tests even if the plugin package is enabled.

Change-Id: I148d7a9c92f210d4584798131a1b23f648f6e5e3
diff --git a/heat_tempest_plugin/common/test.py b/heat_tempest_plugin/common/test.py
index 83ccdc2..e5ed9d0 100644
--- a/heat_tempest_plugin/common/test.py
+++ b/heat_tempest_plugin/common/test.py
@@ -170,6 +170,9 @@
     def setUp(self):
         super(HeatIntegrationTest, self).setUp()
 
+        if not config.CONF.service_available.heat:
+            raise self.skipException("Heat is not available")
+
         self.conf = config.CONF.heat_plugin
 
         self.assertIsNotNone(self.conf.auth_url,
diff --git a/heat_tempest_plugin/tests/api/fixtures.py b/heat_tempest_plugin/tests/api/fixtures.py
index 6c770c8..217c637 100644
--- a/heat_tempest_plugin/tests/api/fixtures.py
+++ b/heat_tempest_plugin/tests/api/fixtures.py
@@ -16,10 +16,14 @@
 from gabbi import fixture
 from heat_tempest_plugin.services import clients
 from tempest import config
+import unittest.case
 
 
 class AuthenticationFixture(fixture.GabbiFixture):
     def start_fixture(self):
+        if not config.CONF.service_available.heat:
+            raise unittest.case.SkipTest("Heat is not available")
+
         conf = config.CONF.heat_plugin
         manager = clients.ClientManager(conf)
         os.environ['OS_TOKEN'] = manager.identity_client.auth_token
diff --git a/releasenotes/notes/honor-service_available-heat-03755bb4b092e753.yaml b/releasenotes/notes/honor-service_available-heat-03755bb4b092e753.yaml
new file mode 100644
index 0000000..d0d273d
--- /dev/null
+++ b/releasenotes/notes/honor-service_available-heat-03755bb4b092e753.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    The ``[service_available] heat`` parameter now takes effect and disables
+    all tests when it is set to ``False``.