summaryrefslogtreecommitdiff
path: root/stress
diff options
context:
space:
mode:
authorSean Dague <sdague@linux.vnet.ibm.com>2013-01-04 15:19:14 -0500
committerSean Dague <sdague@linux.vnet.ibm.com>2013-01-06 23:24:03 -0500
commitf237ccb19f0919cd99bb270f5e4215c278b6dfd1 (patch)
treec0fbfcc778232ec33ba30842faa39b5f4a737429 /stress
parentd18cfe54730e43dc24be3baf65e1141ff20a7cb9 (diff)
downloadtempest-f237ccb19f0919cd99bb270f5e4215c278b6dfd1.tar.gz
Fix T401 and T402 errors
Fix all the one line docstring errors in T401 and T402, now we no longer ignore any of our own rules in hacking.py Fix run_tests.sh to pick up the 'stress' directory, which tox does for pep8. Additional fixes to the stress tests for T4* tests Change-Id: Ie569a924e8eb355afbbd9b244f77dec34061b5cb
Diffstat (limited to 'stress')
-rwxr-xr-xstress/config.py6
-rw-r--r--stress/pending_action.py4
-rw-r--r--stress/test_case.py2
-rwxr-xr-xstress/test_floating_ips.py2
-rw-r--r--stress/test_server_actions.py6
-rw-r--r--stress/test_servers.py8
-rwxr-xr-xstress/tests/floating_ips.py2
-rw-r--r--stress/tests/hard_reboots.py2
-rw-r--r--stress/utils/util.py2
9 files changed, 17 insertions, 17 deletions
diff --git a/stress/config.py b/stress/config.py
index 64091cd79..ca86ce515 100755
--- a/stress/config.py
+++ b/stress/config.py
@@ -39,15 +39,15 @@ class StressConfig(object):
@property
def nova_logdir(self):
- """Directory containing log files on the compute nodes"""
+ """Directory containing log files on the compute nodes."""
return self.get("nova_logdir", None)
@property
def controller(self):
- """Controller host"""
+ """Controller host."""
return self.get("controller", None)
@property
def max_instances(self):
- """Maximum number of instances to create during test"""
+ """Maximum number of instances to create during test."""
return self.get("max_instances", 16)
diff --git a/stress/pending_action.py b/stress/pending_action.py
index 635d2cc80..abfa74d05 100644
--- a/stress/pending_action.py
+++ b/stress/pending_action.py
@@ -46,7 +46,7 @@ class PendingAction(object):
return False
def check_timeout(self):
- """Check for timeouts of TestCase actions"""
+ """Check for timeouts of TestCase actions."""
time_diff = time.time() - self._start_time
if time_diff > self._timeout:
self._logger.error('%s exceeded timeout of %d' %
@@ -76,7 +76,7 @@ class PendingServerAction(PendingAction):
self._target = target_server
def _check_for_status(self, state_string):
- """Check to see if the machine has transitioned states"""
+ """Check to see if the machine has transitioned states."""
t = time.time() # for debugging
target = self._target
_resp, body = self._manager.servers_client.get_server(target['id'])
diff --git a/stress/test_case.py b/stress/test_case.py
index fe510d5a3..d04ace08d 100644
--- a/stress/test_case.py
+++ b/stress/test_case.py
@@ -25,5 +25,5 @@ class StressTestCase(object):
self._logger = logging.getLogger(self.__class__.__name__)
def run(self, nova_manager, state_obj, *pargs, **kargs):
- """Nova API methods to call that would modify state of the cluster"""
+ """Nova API methods to call that would modify state of the cluster."""
return
diff --git a/stress/test_floating_ips.py b/stress/test_floating_ips.py
index 9d89510f5..97e43821b 100755
--- a/stress/test_floating_ips.py
+++ b/stress/test_floating_ips.py
@@ -61,7 +61,7 @@ class TestChangeFloatingIp(test_case.StressTestCase):
class VerifyChangeFloatingIp(pending_action.PendingAction):
- """Verify that floating ip was changed"""
+ """Verify that floating ip was changed."""
def __init__(self, manager, floating_ip, timeout, add=None):
super(VerifyChangeFloatingIp, self).__init__(manager, timeout=timeout)
self.floating_ip = floating_ip
diff --git a/stress/test_server_actions.py b/stress/test_server_actions.py
index 3b4e71cb0..a2032f085 100644
--- a/stress/test_server_actions.py
+++ b/stress/test_server_actions.py
@@ -27,7 +27,7 @@ from utils.util import *
class TestRebootVM(test_case.StressTestCase):
- """Reboot a server"""
+ """Reboot a server."""
def run(self, manager, state, *pargs, **kwargs):
"""
@@ -132,7 +132,7 @@ class VerifyRebootVM(pending_action.PendingServerAction):
# This code needs to be tested against a cluster that supports resize.
#class TestResizeVM(test_case.StressTestCase):
-# """Resize a server (change flavors)"""
+# """Resize a server (change flavors)."""
#
# def run(self, manager, state, *pargs, **kwargs):
# """
@@ -193,7 +193,7 @@ class VerifyRebootVM(pending_action.PendingServerAction):
# timeout=_timeout)
#
#class VerifyResizeVM(pending_action.PendingServerAction):
-# """Verify that resizing of a VM was successful"""
+# """Verify that resizing of a VM was successful."""
# States = enum('VERIFY_RESIZE_CHECK', 'ACTIVE_CHECK')
#
# def __init__(self, manager, state, created_server,
diff --git a/stress/test_servers.py b/stress/test_servers.py
index 9957cdb98..e1cb4d109 100644
--- a/stress/test_servers.py
+++ b/stress/test_servers.py
@@ -96,7 +96,7 @@ class TestCreateVM(test_case.StressTestCase):
class VerifyCreateVM(pending_action.PendingServerAction):
- """Verify that VM was built and is running"""
+ """Verify that VM was built and is running."""
def __init__(self, manager,
state,
created_server,
@@ -175,7 +175,7 @@ class TestKillActiveVM(test_case.StressTestCase):
class VerifyKillActiveVM(pending_action.PendingServerAction):
- """Verify that server was destroyed"""
+ """Verify that server was destroyed."""
def retry(self):
"""
@@ -238,7 +238,7 @@ VerifyKillAnyVM = VerifyKillActiveVM
class TestUpdateVMName(test_case.StressTestCase):
- """Class to change the name of the active server"""
+ """Class to change the name of the active server."""
def run(self, manager, state, *pargs, **kwargs):
"""
Issue HTTP POST request to change the name of active server.
@@ -288,7 +288,7 @@ class TestUpdateVMName(test_case.StressTestCase):
class VerifyUpdateVMName(pending_action.PendingServerAction):
- """Check that VM has new name"""
+ """Check that VM has new name."""
def retry(self):
"""
Check that VM has new name. Update local view of `state` to RUNNING.
diff --git a/stress/tests/floating_ips.py b/stress/tests/floating_ips.py
index d62e89244..6a4452c94 100755
--- a/stress/tests/floating_ips.py
+++ b/stress/tests/floating_ips.py
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Stress test that associates/disasssociates floating ips"""
+"""Stress test that associates/disasssociates floating ips."""
from stress.basher import BasherAction
from stress.driver import *
diff --git a/stress/tests/hard_reboots.py b/stress/tests/hard_reboots.py
index f35c6de1e..fe57be1b2 100644
--- a/stress/tests/hard_reboots.py
+++ b/stress/tests/hard_reboots.py
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Test that reboots random instances in a Nova cluster"""
+"""Test that reboots random instances in a Nova cluster."""
from stress.test_servers import *
diff --git a/stress/utils/util.py b/stress/utils/util.py
index f90796d27..ec63b99db 100644
--- a/stress/utils/util.py
+++ b/stress/utils/util.py
@@ -50,6 +50,6 @@ def execute_on_all(keypath, user, nodes, command):
def enum(*sequential, **named):
- """Create auto-incremented enumerated types"""
+ """Create auto-incremented enumerated types."""
enums = dict(zip(sequential, range(len(sequential))), **named)
return type('Enum', (), enums)