Skip to content

Commit

Permalink
tests: use the containers.podman collection
Browse files Browse the repository at this point in the history
Make use of the containers.podman collection to ease the management of
containers: in particular, the podman_container module is used to start
the container of Candlepin. While the result is the same, using the
podman_container module eases the handling of the parameters for the
containers, which are now typed variables rather than untyped command
line arguments.

There is no behaviour change.

Signed-off-by: Pino Toscano <[email protected]>
  • Loading branch information
ptoscano authored and richm committed Oct 17, 2023
1 parent c6347c3 commit 9b9417d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
1 change: 1 addition & 0 deletions tests/collection-requirements.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
collections:
- name: containers.podman
- name: fedora.linux_system_roles
26 changes: 10 additions & 16 deletions tests/tasks/setup_candlepin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,16 @@
state: present

- name: Start Candlepin container
command:
argv:
- podman
- run
- "--rm"
- "--detach"
- "--name"
- candlepin
- "--publish"
- "8443:8443"
- "--publish"
- "8080:8080"
- "--hostname"
- "{{ lsr_rhc_test_data.candlepin_host }}"
- ghcr.io/ptoscano/candlepin-unofficial
changed_when: false
containers.podman.podman_container:
detach: true
hostname: "{{ lsr_rhc_test_data.candlepin_host }}"
image: ghcr.io/ptoscano/candlepin-unofficial
name: candlepin
publish:
- 8443:8443
- 8080:8080
rm: true
state: started

- name: Ensure directories exist
file:
Expand Down

0 comments on commit 9b9417d

Please sign in to comment.