Merge "Move autoscaling tests with signals to functional"
diff --git a/common/config.py b/common/config.py
index 31a996b..0ea6263 100644
--- a/common/config.py
+++ b/common/config.py
@@ -88,6 +88,12 @@
     cfg.IntOpt('volume_size',
                default=1,
                help='Default size in GB for volumes created by volumes tests'),
+    cfg.BoolOpt('skip_stack_adopt_tests',
+                default=False,
+                help="Skip Stack Adopt Integration tests"),
+    cfg.BoolOpt('skip_stack_abandon_tests',
+                default=False,
+                help="Skip Stack Abandon Integration tests"),
 ]
 
 
diff --git a/common/test.py b/common/test.py
index df4780d..b4c3c81 100644
--- a/common/test.py
+++ b/common/test.py
@@ -308,6 +308,8 @@
     def stack_adopt(self, stack_name=None, files=None,
                     parameters=None, environment=None, adopt_data=None,
                     wait_for_status='ADOPT_COMPLETE'):
+        if self.conf.skip_stack_adopt_tests:
+            self.skipTest('Testing Stack adopt disabled in conf, skipping')
         name = stack_name or self._stack_rand_name()
         templ_files = files or {}
         params = parameters or {}
@@ -326,3 +328,10 @@
         stack_identifier = '%s/%s' % (name, stack.id)
         self._wait_for_stack_status(stack_identifier, wait_for_status)
         return stack_identifier
+
+    def stack_abandon(self, stack_id):
+        if self.conf.skip_stack_abandon_tests:
+            self.addCleanup(self.client.stacks.delete, stack_id)
+            self.skipTest('Testing Stack abandon disabled in conf, skipping')
+        info = self.client.stacks.abandon(stack_id=stack_id)
+        return info
diff --git a/functional/test_template_resource.py b/functional/test_template_resource.py
index fd88d23..5df4235 100644
--- a/functional/test_template_resource.py
+++ b/functional/test_template_resource.py
@@ -368,7 +368,7 @@
             self.keypair_name = self.keypair.id
 
     def test_update_on_failed_create(self):
-        # create a stack with "server" dependant on "keypair", but
+        # create a stack with "server" dependent on "keypair", but
         # keypair fails, so "server" is not created properly.
         # We then fix the template and it should succeed.
         broken_templ = self.main_template.replace('replace-this',
@@ -437,7 +437,7 @@
         stack_identifier = '%s/%s' % (stack_name, stack.id)
         self._wait_for_stack_status(stack_identifier, 'CREATE_COMPLETE')
 
-        info = self.client.stacks.abandon(stack_id=stack_identifier)
+        info = self.stack_abandon(stack_id=stack_identifier)
         self.assertEqual(self._yaml_to_json(self.main_template),
                          info['template'])
         self.assertEqual(self._yaml_to_json(self.nested_templ),