Adam Litke has uploaded a new change for review. Change subject: storagetestlib: Add fake_env() helper ......................................................................
storagetestlib: Add fake_env() helper Permutated tests would like to test 'file' and 'block' environments. Add a helper to make it easy for tests to produce both environments while displaying user-friendly test output. Change-Id: Iabf3bc79e80340071c8b9873db5b493339a401ad Signed-off-by: Adam Litke <[email protected]> --- M tests/storagetestlib.py 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/60998/1 diff --git a/tests/storagetestlib.py b/tests/storagetestlib.py index 44a4e31..f685403 100644 --- a/tests/storagetestlib.py +++ b/tests/storagetestlib.py @@ -101,6 +101,15 @@ yield FakeBlockEnv(tmpdir, sd_manifest, fake_sdc, lvm) +def fake_env(storage_type): + if storage_type == 'file': + return fake_file_env() + elif storage_type == 'block': + return fake_block_env() + else: + raise ValueError("Invalid storage_type: %r" % storage_type) + + class FakeMetadata(dict): @contextmanager def transaction(self): -- To view, visit https://gerrit.ovirt.org/60998 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabf3bc79e80340071c8b9873db5b493339a401ad Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/admin/lists/[email protected]
