Improve molecule tests for tripleo-container-manage (systemd)

Change-Id: Id14ad4876bdf7dcc979d5ecf4fe2b4751c635b88
This commit is contained in:
Emilien Macchi 2019-11-15 15:03:36 +01:00
parent 6beea6116a
commit 484faa7e80
2 changed files with 23 additions and 1 deletions

View File

@ -42,3 +42,21 @@
- "'fedora:latest' in fedora_infos.containers.0.ImageName"
fail_msg: 'fedora container has wrong image'
success_msg: 'fedora container has the right image'
- name: Check if tripleo_fedora systemd service is active
command: systemctl is-active --quiet tripleo_fedora
register: tripleo_fedora_active_result
- name: Assert that tripleo_fedora systemd service is active
assert:
that:
- tripleo_fedora_active_result.rc == 0
fail_msg: 'tripleo_fedora systemd service is not active'
success_msg: 'tripleo_fedora systemd service is active'
- name: Check if tripleo_fedora systemd healthcheck service is active
command: systemctl is-active --quiet tripleo_fedora_healthcheck.timer
register: tripleo_fedora_healthcheck_active_result
- name: Assert that tripleo_fedora systemd healthcheck service is active
assert:
that:
- tripleo_fedora_healthcheck_active_result.rc == 0
fail_msg: 'tripleo_fedora systemd healthcheck service is not active'
success_msg: 'tripleo_fedora systemd healthcheck service is active'

View File

@ -31,6 +31,10 @@
content: |
{
"image": "fedora:latest",
"net": "host"
"net": "host",
"command": "sleep 3600",
"restart": "always",
"net": "host",
"healthcheck": { "test": "echo test" }
}
dest: '/tmp/container-configs/fedora.json'