Change in vdsm[master]: storagetestlib: use a real metadata file for FileSD manifests
alitke at redhat.com
alitke at redhat.com
Tue Nov 17 19:36:54 UTC 2015
Adam Litke has uploaded a new change for review.
Change subject: storagetestlib: use a real metadata file for FileSD manifests
......................................................................
storagetestlib: use a real metadata file for FileSD manifests
When building a fake FileStorageDomainManifest place the metadata in
the right place within the domain's file hierarchy (as opposed to
keeping it in memory). This is needed since code in VolumeMetadata
sometimes instantiates its controlling manifest and the metadata must be
present in the proper place when testing this code.
Change-Id: I1e09b3e2199c638452214de4c2e4dfd826b51242
Signed-off-by: Adam Litke <alitke at redhat.com>
---
M tests/storagetestlib.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/48695/1
diff --git a/tests/storagetestlib.py b/tests/storagetestlib.py
index 409312f..10d3371 100644
--- a/tests/storagetestlib.py
+++ b/tests/storagetestlib.py
@@ -78,9 +78,11 @@
def make_filesd_manifest(tmpdir, metadata=None):
sduuid = str(uuid.uuid4())
domain_path = os.path.join(tmpdir, sduuid)
- make_file(get_metafile_path(domain_path))
+ metafile = get_metafile_path(domain_path)
+ make_file(metafile)
if metadata is None:
- metadata = get_default_metadata()
+ metadata = fileSD.FileSDMetadata(metafile)
+ metadata.update(get_default_metadata())
manifest = fileSD.FileStorageDomainManifest(domain_path, metadata)
os.makedirs(os.path.join(manifest.domaindir, sd.DOMAIN_IMAGES))
return manifest
--
To view, visit https://gerrit.ovirt.org/48695
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e09b3e2199c638452214de4c2e4dfd826b51242
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
More information about the vdsm-patches
mailing list