test: Add running podman with non-root test
Bug BZ#2078937 has been fixed by osbuild PR#1013. Test should be updated to test the fix and avoid regression
This commit is contained in:
parent
1017aee438
commit
a6e2755fad
2 changed files with 29 additions and 4 deletions
|
|
@ -170,7 +170,7 @@
|
|||
"rhel-8.6": {
|
||||
"dependencies": {
|
||||
"osbuild": {
|
||||
"commit": "b57376d1607587d3739eb2c754ba6b27e272198a"
|
||||
"commit": "e51d08ba9ee84036d18b19d4af70d3f8a063e2c0"
|
||||
}
|
||||
},
|
||||
"repos": [
|
||||
|
|
@ -216,7 +216,7 @@
|
|||
"rhel-9.0": {
|
||||
"dependencies": {
|
||||
"osbuild": {
|
||||
"commit": "b57376d1607587d3739eb2c754ba6b27e272198a"
|
||||
"commit": "e51d08ba9ee84036d18b19d4af70d3f8a063e2c0"
|
||||
}
|
||||
},
|
||||
"repos": [
|
||||
|
|
@ -262,14 +262,14 @@
|
|||
"centos-8": {
|
||||
"dependencies": {
|
||||
"osbuild": {
|
||||
"commit": "b57376d1607587d3739eb2c754ba6b27e272198a"
|
||||
"commit": "e51d08ba9ee84036d18b19d4af70d3f8a063e2c0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"centos-9": {
|
||||
"dependencies": {
|
||||
"osbuild": {
|
||||
"commit": "b57376d1607587d3739eb2c754ba6b27e272198a"
|
||||
"commit": "e51d08ba9ee84036d18b19d4af70d3f8a063e2c0"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -368,6 +368,31 @@
|
|||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
|
||||
# case: check running container with podman (non-root)
|
||||
- name: run ubi8 image with non-root
|
||||
command: podman run ubi8:latest cat /etc/redhat-release
|
||||
register: podman_result
|
||||
retries: 30 # due to https://github.com/osbuild/osbuild-composer/issues/2492
|
||||
delay: 2
|
||||
until: podman_result is success
|
||||
ignore_errors: yes
|
||||
|
||||
- name: run container test
|
||||
block:
|
||||
- assert:
|
||||
that:
|
||||
- podman_result is succeeded
|
||||
- "'Red Hat Enterprise Linux release' in podman_result.stdout"
|
||||
fail_msg: "failed run container with podman (non-root)"
|
||||
success_msg: "running container with podman (non-root) successed"
|
||||
always:
|
||||
- set_fact:
|
||||
total_counter: "{{ total_counter | int + 1 }}"
|
||||
rescue:
|
||||
- name: failed count + 1
|
||||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
|
||||
# case: check dnf package and it should not be installed
|
||||
# https://github.com/osbuild/osbuild-composer/blob/master/internal/distro/rhel8/distro.go#L642
|
||||
- name: dnf should not be installed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue