diff --git a/common/test.py b/common/test.py
index 584af6d..747a76e 100644
--- a/common/test.py
+++ b/common/test.py
@@ -443,7 +443,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:
+        if (self.conf.skip_test_stack_action_list and
+                'ADOPT' in self.conf.skip_test_stack_action_list):
             self.skipTest('Testing Stack adopt disabled in conf, skipping')
         name = stack_name or self._stack_rand_name()
         templ_files = files or {}
@@ -465,7 +466,8 @@
         return stack_identifier
 
     def stack_abandon(self, stack_id):
-        if self.conf.skip_stack_abandon_tests:
+        if (self.conf.skip_test_stack_action_list and
+                'ABANDON' in self.conf.skip_test_stack_action_list):
             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)
@@ -474,7 +476,9 @@
     def stack_suspend(self, stack_identifier):
         stack_name = stack_identifier.split('/')[0]
         self.client.actions.suspend(stack_name)
-
+        if (self.conf.skip_test_stack_action_list and
+                'SUSPEND' in self.conf.skip_test_stack_action_list):
+            self.skipTest('Testing Stack suspend disabled in conf, skipping')
         # improve debugging by first checking the resource's state.
         self._wait_for_all_resource_status(stack_identifier,
                                            'SUSPEND_COMPLETE')
@@ -483,6 +487,9 @@
     def stack_resume(self, stack_identifier):
         stack_name = stack_identifier.split('/')[0]
         self.client.actions.resume(stack_name)
+        if (self.conf.skip_test_stack_action_list and
+                'RESUME' in self.conf.skip_test_stack_action_list):
+            self.skipTest('Testing Stack resume disabled in conf, skipping')
 
         # improve debugging by first checking the resource's state.
         self._wait_for_all_resource_status(stack_identifier,
