Adam Litke has posted comments on this change. Change subject: tests: volume_artifacts: validate FileVolumeArtifacts metadata ......................................................................
Patch Set 2: (2 comments) https://gerrit.ovirt.org/#/c/56172/2/tests/storage_volume_artifacts_test.py File tests/storage_volume_artifacts_test.py: Line 262: Line 263: def validate_metadata(self, env, artifacts): Line 264: meta_path = artifacts.meta_volatile_path Line 265: self.assertTrue(os.path.exists(meta_path)) Line 266: md_lines = env.sd_manifest.oop.directReadLines(meta_path) > Why do you need to read the lines from our fake storage using oop? Done Line 267: md = volume.VolumeMetadata.from_lines(md_lines) Line 268: Line 269: # Test a few fields just to check that metadata was written Line 270: self.assertEqual(artifacts.sd_manifest.sdUUID, md.sd_id) Line 267: md = volume.VolumeMetadata.from_lines(md_lines) Line 268: Line 269: # Test a few fields just to check that metadata was written Line 270: self.assertEqual(artifacts.sd_manifest.sdUUID, md.sd_id) Line 271: self.assertEqual(artifacts.img_id, md.img_id) > Why not check all fields? Because it would add unnecessary complication to the tests which would now have to pass around a lot more parameters. When we expect certain metadata values we have a specific test for it. This is just a validation that the metadata could be read and interrogated. Line 272: Line 273: def failure(*args): Line 274: raise ExpectedFailure() Line 275: -- To view, visit https://gerrit.ovirt.org/56172 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I366fd989b1387aa483a74e14dcfdc91b9f422060 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
