diff --git a/tempest/stress/README.rst b/tempest/stress/README.rst index 661763cce9..31642b0997 100644 --- a/tempest/stress/README.rst +++ b/tempest/stress/README.rst @@ -30,7 +30,7 @@ Running the sample test To test installation, do the following (from the tempest/stress directory): - ./run_stress.py etc/sample-test.json -d 30 + ./run_stress.py etc/server-create-destroy-test.json -d 30 This sample test tries to create a few VMs and kill a few VMs. diff --git a/tempest/stress/actions/create_destroy_server.py b/tempest/stress/actions/server_create_destroy.py similarity index 96% rename from tempest/stress/actions/create_destroy_server.py rename to tempest/stress/actions/server_create_destroy.py index 68dc14891e..1a1e30b443 100644 --- a/tempest/stress/actions/create_destroy_server.py +++ b/tempest/stress/actions/server_create_destroy.py @@ -16,7 +16,7 @@ from tempest.common.utils.data_utils import rand_name import tempest.stress.stressaction as stressaction -class CreateDestroyServerTest(stressaction.StressAction): +class ServerCreateDestroyTest(stressaction.StressAction): def setUp(self, **kwargs): self.image = self.manager.config.compute.image_ref diff --git a/tempest/stress/actions/volume_create_delete.py b/tempest/stress/actions/volume_create_delete.py index 184f870525..e29d9c41da 100644 --- a/tempest/stress/actions/volume_create_delete.py +++ b/tempest/stress/actions/volume_create_delete.py @@ -14,20 +14,20 @@ from tempest.common.utils.data_utils import rand_name import tempest.stress.stressaction as stressaction -class CreateDeleteTest(stressaction.StressAction): +class VolumeCreateDeleteTest(stressaction.StressAction): def run(self): name = rand_name("volume") self.logger.info("creating %s" % name) - resp, volume = self.manager.volumes_client.\ - create_volume(size=1, display_name=name) + volumes_client = self.manager.volumes_client + resp, volume = volumes_client.create_volume(size=1, + display_name=name) assert(resp.status == 200) vol_id = volume['id'] - status = 'available' - self.manager.volumes_client.wait_for_volume_status(vol_id, status) + volumes_client.wait_for_volume_status(vol_id, 'available') self.logger.info("created %s" % volume['id']) self.logger.info("deleting %s" % name) - resp, _ = self.manager.volumes_client.delete_volume(vol_id) + resp, _ = volumes_client.delete_volume(vol_id) assert(resp.status == 202) - self.manager.volumes_client.wait_for_resource_deletion(vol_id) + volumes_client.wait_for_resource_deletion(vol_id) self.logger.info("deleted %s" % vol_id) diff --git a/tempest/stress/etc/sample-test.json b/tempest/stress/etc/server-create-destroy-test.json similarity index 52% rename from tempest/stress/etc/sample-test.json rename to tempest/stress/etc/server-create-destroy-test.json index 494c823eab..17d5e1a3c3 100644 --- a/tempest/stress/etc/sample-test.json +++ b/tempest/stress/etc/server-create-destroy-test.json @@ -1,4 +1,4 @@ -[{"action": "tempest.stress.actions.create_destroy_server.CreateDestroyServerTest", +[{"action": "tempest.stress.actions.server_create_destroy.ServerCreateDestroyTest", "threads": 8, "use_admin": false, "use_isolated_tenants": false, diff --git a/tempest/stress/etc/stress-tox-job.json b/tempest/stress/etc/stress-tox-job.json index 3534c265f9..dffc469cbb 100644 --- a/tempest/stress/etc/stress-tox-job.json +++ b/tempest/stress/etc/stress-tox-job.json @@ -1,10 +1,10 @@ -[{"action": "tempest.stress.actions.create_destroy_server.CreateDestroyServerTest", +[{"action": "tempest.stress.actions.server_create_destroy.ServerCreateDestroyTest", "threads": 8, "use_admin": false, "use_isolated_tenants": false, "kwargs": {} }, - {"action": "tempest.stress.actions.volume_create_delete.CreateDeleteTest", + {"action": "tempest.stress.actions.volume_create_delete.VolumeCreateDeleteTest", "threads": 4, "use_admin": false, "use_isolated_tenants": false, diff --git a/tempest/stress/etc/volume-assign-delete-test.json b/tempest/stress/etc/volume-attach-delete-test.json similarity index 100% rename from tempest/stress/etc/volume-assign-delete-test.json rename to tempest/stress/etc/volume-attach-delete-test.json diff --git a/tempest/stress/etc/volume-create-delete-test.json b/tempest/stress/etc/volume-create-delete-test.json index 6325bdc8b3..e8a58f7c52 100644 --- a/tempest/stress/etc/volume-create-delete-test.json +++ b/tempest/stress/etc/volume-create-delete-test.json @@ -1,4 +1,4 @@ -[{"action": "tempest.stress.actions.volume_create_delete.CreateDeleteTest", +[{"action": "tempest.stress.actions.volume_create_delete.VolumeCreateDeleteTest", "threads": 4, "use_admin": false, "use_isolated_tenants": false,