Skip to content

Commit

Permalink
update docker compose testing
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Sjögren <[email protected]>
  • Loading branch information
konstruktoid committed Sep 21, 2024
1 parent 0f13aa1 commit d75a215
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@
ansible.builtin.lineinfile:
path: /var/tmp/{{ docker_user }}-docker-compose.yml
line: |
version: '3'
services:
web:
image: nginx:latest
Expand Down Expand Up @@ -230,7 +229,6 @@
ansible.builtin.command:
cmd: docker compose -f "/var/tmp/{{ docker_user }}-docker-compose.yml" up -d
changed_when: false
register: compose_output

- name: Verify compose website
ansible.builtin.uri:
Expand Down Expand Up @@ -258,15 +256,15 @@
- requests<2.32 # https://github.com/ansible-community/molecule-plugins/issues/256

- name: Create and start services
community.docker.docker_compose:
community.docker.docker_compose_v2:
project_src: /var/tmp/
files: "{{ docker_user }}-docker-compose.yml"
register: compose_output

- name: Verify that web service are running
ansible.builtin.assert:
that:
- compose_output.services.web.tmp_web_1.state.running
- not compose_output.failed

- name: Container verification block
environment:
Expand Down

0 comments on commit d75a215

Please sign in to comment.