summaryrefslogtreecommitdiffstats
path: root/test/units/cli
diff options
context:
space:
mode:
authorElijah DeLee <kdelee@redhat.com>2022-08-17 20:42:47 +0200
committerGitHub <noreply@github.com>2022-08-17 20:42:47 +0200
commitf9a450551de47ac2b9d1d7e66a103cbf8f05c37f (patch)
tree6e1080ab85a1af02823a0cfb396f2e4e6cb9a75b /test/units/cli
parentadd note to use package_facts module (#78484) (diff)
downloadansible-f9a450551de47ac2b9d1d7e66a103cbf8f05c37f.tar.xz
ansible-f9a450551de47ac2b9d1d7e66a103cbf8f05c37f.zip
add required file to collection skeleton (#77418)
* add required file to collection skeleton This file is required to be able to upload a collection. It is present in https://github.com/ansible-collections/collection_template/blob/main/meta/runtime.yml but that does not get used by default. Without this, if you use the "ansible-galaxy collection init" command and you try and publish that collection without adding this file, you get the error: "ERROR! Galaxy import process failed: 'requires_ansible' in meta/runtime.yml is mandatory, but no meta/runtime.yml found (Code: UNKNOWN)" Also updates relevant test and adds a changelog fragment
Diffstat (limited to 'test/units/cli')
-rw-r--r--test/units/cli/test_galaxy.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/units/cli/test_galaxy.py b/test/units/cli/test_galaxy.py
index 49b3697229..8ff564085c 100644
--- a/test/units/cli/test_galaxy.py
+++ b/test/units/cli/test_galaxy.py
@@ -640,7 +640,7 @@ def test_collection_build(collection_artifact):
tar_members = tar.getmembers()
valid_files = ['MANIFEST.json', 'FILES.json', 'roles', 'docs', 'plugins', 'plugins/README.md', 'README.md',
- 'runme.sh']
+ 'runme.sh', 'meta', 'meta/runtime.yml']
assert len(tar_members) == len(valid_files)
# Verify the uid and gid is 0 and the correct perms are set
@@ -696,16 +696,16 @@ def test_collection_build(collection_artifact):
finally:
files_file.close()
- assert len(files['files']) == 7
+ assert len(files['files']) == 9
assert files['format'] == 1
assert len(files.keys()) == 2
- valid_files_entries = ['.', 'roles', 'docs', 'plugins', 'plugins/README.md', 'README.md', 'runme.sh']
+ valid_files_entries = ['.', 'roles', 'docs', 'plugins', 'plugins/README.md', 'README.md', 'runme.sh', 'meta', 'meta/runtime.yml']
for file_entry in files['files']:
assert file_entry['name'] in valid_files_entries
assert file_entry['format'] == 1
- if file_entry['name'] in ['plugins/README.md', 'runme.sh']:
+ if file_entry['name'] in ['plugins/README.md', 'runme.sh', 'meta/runtime.yml']:
assert file_entry['ftype'] == 'file'
assert file_entry['chksum_type'] == 'sha256'
# Can't test the actual checksum as the html link changes based on the version or the file contents