test: smoke test --version
Only verify it returns the correct structure with (some) values in it. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
3021afb9f7
commit
7b535fdff5
1 changed files with 17 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import platform
|
|||
import subprocess
|
||||
|
||||
import pytest
|
||||
import yaml
|
||||
|
||||
|
||||
@pytest.mark.parametrize("use_librepo", [False, True])
|
||||
|
|
@ -156,3 +157,19 @@ def test_container_manifest_seeded_is_the_same(build_container, use_seed_arg):
|
|||
else:
|
||||
print(cmd)
|
||||
assert len(manifests) == 3
|
||||
|
||||
|
||||
@pytest.mark.skipif(os.getuid() != 0, reason="needs root")
|
||||
def test_container_version_smoke(build_container):
|
||||
output = subprocess.check_output([
|
||||
"podman", "run",
|
||||
"--privileged",
|
||||
build_container,
|
||||
"--version",
|
||||
])
|
||||
|
||||
ver_yaml = yaml.load(output, yaml.loader.SafeLoader)
|
||||
|
||||
assert ver_yaml["image-builder"]["version"] != ""
|
||||
assert ver_yaml["image-builder"]["commit"] != ""
|
||||
assert ver_yaml["image-builder"]["dependencies"]["images"] != ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue