GRM-20: fix molecule idempotence with mode-specific systemd templates
This commit is contained in:
@@ -29,16 +29,27 @@
|
||||
- binary_stat.stat.exists
|
||||
fail_msg: "Binary runner executable missing after update"
|
||||
|
||||
- name: Check systemd template still exists
|
||||
- name: Check Docker mode systemd template still exists
|
||||
ansible.builtin.stat:
|
||||
path: "/etc/systemd/system/gitea-runner@.service"
|
||||
register: service_stat
|
||||
path: "/etc/systemd/system/gitea-runner-docker@.service"
|
||||
register: docker_service_stat
|
||||
|
||||
- name: Assert systemd template still exists after update
|
||||
- name: Assert Docker mode systemd template still exists after update
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- service_stat.stat.exists
|
||||
fail_msg: "Systemd template unit missing after update"
|
||||
- docker_service_stat.stat.exists
|
||||
fail_msg: "Docker mode systemd template missing after update"
|
||||
|
||||
- name: Check Binary mode systemd template still exists
|
||||
ansible.builtin.stat:
|
||||
path: "/etc/systemd/system/gitea-runner-binary@.service"
|
||||
register: binary_service_stat
|
||||
|
||||
- name: Assert Binary mode systemd template still exists after update
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- binary_service_stat.stat.exists
|
||||
fail_msg: "Binary mode systemd template missing after update"
|
||||
|
||||
- name: Check Docker mode data directory still exists
|
||||
ansible.builtin.stat:
|
||||
|
||||
Reference in New Issue
Block a user