Change in vdsm[master]: tests: Unify test names

nsoffer at redhat.com nsoffer at redhat.com
Tue Jan 26 18:17:56 UTC 2016


Nir Soffer has uploaded a new change for review.

Change subject: tests: Unify test names
......................................................................

tests: Unify test names

Unify tests names, revealing the fact that we test now only creation of
a new image, since we don't support yet cow format, enabling creation of
the second volume in existing image.

This should be squashed into the previous patch, posting for review
before squashing it.

Change-Id: I8abc8462449863bdd871ba02610d4280bacfba82
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M tests/volume_artifacts_test.py
1 file changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/52771/1

diff --git a/tests/volume_artifacts_test.py b/tests/volume_artifacts_test.py
index 2fc4d8f..8df3fdf 100644
--- a/tests/volume_artifacts_test.py
+++ b/tests/volume_artifacts_test.py
@@ -64,26 +64,26 @@
         self.img_uuid = str(uuid.uuid4())
         self.vol_uuid = str(uuid.uuid4())
 
-    def test_nonexist(self):
+    def test_new_image(self):
         with self.fake_env() as env:
             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
             self.assertRaises(ValidationError,
                               self.validate_artifacts, artifacts)
 
-    def test_create_in_new_image(self):
+    def test_new_image_create(self):
         with self.fake_env() as env:
             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
             artifacts.create(*BASE_RAW_PARAMS)
             self.validate_artifacts(artifacts)
 
-    def test_create_same(self):
+    def test_new_image_create_twice(self):
         with self.fake_env() as env:
             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
             artifacts.create(*BASE_RAW_PARAMS)
             self.assertRaises(se.DomainHasGarbage, artifacts.create,
                               *BASE_RAW_PARAMS)
 
-    def test_commit(self):
+    def test_new_image_create_and_commit(self):
         with self.fake_env() as env:
             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
             size, vol_format, disk_type, desc = BASE_RAW_PARAMS
@@ -102,7 +102,7 @@
 
     # Invalid use of artifacts
 
-    def test_recreate_same_volume(self):
+    def test_volume_exists(self):
         with self.fake_env() as env:
             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
             artifacts.create(*BASE_RAW_PARAMS)
@@ -111,12 +111,12 @@
             self.assertRaises(se.VolumeAlreadyExists, artifacts.create,
                               *BASE_RAW_PARAMS)
 
-    def test_commit_without_create(self):
+    def test_new_image_commit_without_create(self):
         with self.fake_env() as env:
             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
             self.assertRaises(OSError, artifacts.commit)
 
-    def test_commit_twice(self):
+    def test_new_image_commit_twice(self):
         with self.fake_env() as env:
             artifacts = env.volume_artifacts(self.img_uuid, self.vol_uuid)
             artifacts.create(*BASE_RAW_PARAMS)
@@ -129,7 +129,7 @@
     def fake_env(self):
         return fake_file_env()
 
-    def test_create_fail_before_meta(self):
+    def test_new_image_create_metadata_failure(self):
         # If we fail before the metadata is created we will have an empty
         # image directory with a garbage collection prefix left behind
         with self.fake_env() as env:
@@ -139,7 +139,7 @@
                               *BASE_RAW_PARAMS)
             self.validate_new_image_path(artifacts, nr_files=0)
 
-    def test_create_fail_before_lease(self):
+    def test_new_image_create_lease_failure(self):
         # If we fail before the lease is created we will have a garbage image
         # directory containing a metadata file with the .artifact extension
         with self.fake_env() as env:
@@ -156,7 +156,7 @@
             self.assertRaises(se.DomainHasGarbage, artifacts.create,
                               *BASE_RAW_PARAMS)
 
-    def test_create_fail_before_container(self):
+    def test_new_image_create_container_failure(self):
         # If we fail before the container is created we will have a garbage
         # image directory containing artifact metadata and a lease file.
         with self.fake_env() as env:
@@ -174,7 +174,7 @@
             self.assertRaises(se.DomainHasGarbage, artifacts.create,
                               *BASE_RAW_PARAMS)
 
-    def test_create_with_image_garbage(self):
+    def test_garbage_image_dir(self):
         # Creating the an artifact using an existing garbage image directory is
         # not allowed.
         with self.fake_env() as env:


-- 
To view, visit https://gerrit.ovirt.org/52771
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8abc8462449863bdd871ba02610d4280bacfba82
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list