From c461125d7cca04fb080188d508d9723050cb59d9 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 10 Aug 2021 14:31:39 -0600 Subject: [PATCH] Gating tests: run toolbox tests Successful on rawhide as of toolbox-0.0.99.2^3.git075b9a8d2779-7.fc36 on 2021-09-13. See: https://github.com/containers/podman/issues/10296 Signed-off-by: Ed Santiago --- tests/roles/rootless_user_ready/tasks/main.yml | 8 ++++++++ tests/test_podman.yml | 3 +++ tests/test_toolbox.yml | 10 ++++++++++ 3 files changed, 21 insertions(+) create mode 100644 tests/test_toolbox.yml diff --git a/tests/roles/rootless_user_ready/tasks/main.yml b/tests/roles/rootless_user_ready/tasks/main.yml index cfed03b..88ad032 100644 --- a/tests/roles/rootless_user_ready/tasks/main.yml +++ b/tests/roles/rootless_user_ready/tasks/main.yml @@ -4,3 +4,11 @@ - name: rootless account | enable linger shell: loginctl enable-linger {{ rootless_user }} + +- name: rootless account | get uid + getent: + database: passwd + key: "{{ rootless_user }}" + +- name: rootless account | preserve uid + set_fact: rootless_uid="{{ getent_passwd[rootless_user][1] }}" diff --git a/tests/test_podman.yml b/tests/test_podman.yml index d5e65be..fc30921 100644 --- a/tests/test_podman.yml +++ b/tests/test_podman.yml @@ -39,6 +39,9 @@ loop_control: loop_var: want_cgroups + - name: test toolbox + include_tasks: test_toolbox.yml + # Postprocessing: check for FAIL or ERROR in any test, exit 1 if so - name: check results include_tasks: check_results.yml diff --git a/tests/test_toolbox.yml b/tests/test_toolbox.yml new file mode 100644 index 0000000..9b0859c --- /dev/null +++ b/tests/test_toolbox.yml @@ -0,0 +1,10 @@ +--- +- include_role: + name: run_bats_tests + vars: + tests: + - name: toolbox + package: toolbox + become: true + environment: + XDG_RUNTIME_DIR: /run/user/{{ rootless_uid }}