Nir Soffer has posted comments on this change.

Change subject: storagetestlib: Add sdVersion param to the test API.
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/65308/3/tests/storagetestlib_test.py
File tests/storagetestlib_test.py:

Line 91:             self.assertEquals(3, env.sd_manifest.getVersion())
Line 92: 
Line 93:     def test_block_domain_version_4(self):
Line 94:         with fake_env('block', sd_version=4) as env:
Line 95:             self.assertEquals(4, env.sd_manifest.getVersion())
Nice!

But wouldn't it be even better if we merge to one test with permutations?

    @permutations([
        # env_type, sd_version
        ("file", 3),
        ("file", 4),
        ("block", 3),
        ("block", 4),
    ])
    def test_domain_version(self, env_type, sd_version):
        with fake_env(env_type, sd_version=sd_version) as env:
            self.assertEquals(sd_version, env.sd_manifest.getVersion())

And we can have another test for the default.
Line 96: 
Line 97:     def test_volume_structure(self):
Line 98:         with fake_file_env() as env:
Line 99:             img_id = make_uuid()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9759fa6d8b2bd7c359fd188d1e18ffbba5004941
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to