Remove validate.py main()
Since Ic626bd444e888c52bd9f350cc49d3529bb145ee2, transform.py -n does everything validate.py's main() did, and more. Remove validate.py's main() and its invocation from the 'validate' tox job. Change-Id: Ib0abf2cf9337f46650662f7a98549ab7d18ac5e2
This commit is contained in:
parent
026d1ec10e
commit
b11cff169e
1
tox.ini
1
tox.ini
@ -13,7 +13,6 @@ deps = -r{toxinidir}/requirements.txt
|
||||
[testenv:validate]
|
||||
deps = jsonschema
|
||||
commands =
|
||||
python validate.py
|
||||
python transform.py -n
|
||||
|
||||
[testenv:publish]
|
||||
|
13
validate.py
13
validate.py
@ -13,11 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import json
|
||||
import sys
|
||||
|
||||
import jsonschema
|
||||
import yaml
|
||||
|
||||
|
||||
def validate_schema(schema, data, resolver=None):
|
||||
@ -63,12 +59,3 @@ def validate_all(schema, data, resolver=None):
|
||||
print(msg)
|
||||
ret = False
|
||||
return ret
|
||||
|
||||
|
||||
def main():
|
||||
schema = json.load(open('schema.json', 'r'))
|
||||
data = yaml.load(open('service-types.yaml', 'r'))
|
||||
return int(not validate_all(schema, data))
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
Loading…
Reference in New Issue
Block a user