Change in vdsm[master]: contrib: schema converter

nsoffer at redhat.com nsoffer at redhat.com
Wed Mar 23 01:42:08 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: contrib: schema converter
......................................................................


Patch Set 25:

(3 comments)

https://gerrit.ovirt.org/#/c/52864/25/tests/schemaValidationTest.py
File tests/schemaValidationTest.py:

Line 77
Line 78
Line 79
Line 80
Line 81
Why do we need to change this test?


Line 36: from nose.plugins.skip import SkipTest
Line 37: 
Line 38: 
Line 39: @contextmanager
Line 40: def schema_not_found():
Why do we need this?
Line 41:     try:
Line 42:         yield
Line 43:     except schemaapi.SchemaNotFound:
Line 44:         raise SkipTest('yaml schema not available')


Line 194:         else:
Line 195:             return None
Line 196: 
Line 197: 
Line 198: class JsonToYamlValidation(TestCaseBase):
To test the yaml schema, we don't need to find the schema.

The test should:
- Convert the json schema to yaml
- Read both json and yaml schema
- Normalized type names (e.g. str/string)
- Verify that both are the same

This is the only thing we need to replace the json schema with yaml.
Line 199: 
Line 200:     def swap_types(self, name):
Line 201:         if name == 'str':
Line 202:             return 'string'


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3921cebb7f550f63849f3bc5c80636b6e9495c92
Gerrit-PatchSet: 25
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list