Browse Source

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

tags/1.0.0
Zuul 2 weeks ago
parent
commit
23cb4dde1e
2 changed files with 23 additions and 1 deletions
  1. +18
    -0
      tripleo_ansible/roles/tripleo-container-manage/molecule/default/playbook.yml
  2. +5
    -1
      tripleo_ansible/roles/tripleo-container-manage/molecule/default/prepare.yml

+ 18
- 0
tripleo_ansible/roles/tripleo-container-manage/molecule/default/playbook.yml 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'

+ 5
- 1
tripleo_ansible/roles/tripleo-container-manage/molecule/default/prepare.yml 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'

Loading…
Cancel
Save