Added doc for galaxy-metadata sanity test and fixed the errors.

pull/75335/head
Ompragash Viswanathan 3 years ago
parent 290e55c302
commit 6611af16ee

@ -0,0 +1,5 @@
galaxy-metadata
===============
* Validates the required keys (namespace, name, version, readme, authors) for the collection galaxy.yml metadata file.
* If the required keys arent present or if the required and other keys contain ``null`` value in the galaxy.yml file then this sanity test will throw an error.

@ -1,8 +1,9 @@
#!/usr/bin/env python
"""Schema validation of ansible-core's ansible_builtin_runtime.yml and collection's meta/runtime.yml"""
"""Validates the required keys (namespace, name, version, readme, authors) for the collection galaxy.yml metadata file"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import re
import sys
import yaml
@ -12,6 +13,7 @@ from voluptuous.humanize import humanize_error
from ansible.module_utils.six import string_types
def validate_galaxy_metadata_file(path):
"""Validate explicit galaxy.yml metadata file"""
try:
@ -64,5 +66,6 @@ def main():
if path == collection_galaxy_file:
validate_galaxy_metadata_file(path)
if __name__ == '__main__':
main()

Loading…
Cancel
Save