Skip to content

Commit a2b9dfb

Browse files
committed
Try to re-enable local integration tests.
1 parent 7ef98c2 commit a2b9dfb

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

tests/integration/files/includes/tasks/prep.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
ansible.builtin.debug:
44
var: ansible_lsb
55

6+
- name: "Print OS Information."
7+
ansible.builtin.debug:
8+
var: ansible_facts
9+
610
- name: "Install dependencies."
711
ansible.builtin.package:
812
name: python3-apt
@@ -20,24 +24,21 @@
2024
url_password: "{{ checkmk_var_download_pass | default(omit) }}"
2125
loop: "{{ checkmk_var_test_sites }}"
2226
when: |
23-
((checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre")
24-
and not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages
27+
not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages
2528
2629
- name: "Install Checkmk Versions."
2730
ansible.builtin.apt:
2831
deb: /tmp/checkmk-server-{{ item.site }}.deb
2932
state: present
3033
loop: "{{ checkmk_var_test_sites }}"
3134
when: |
32-
((checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre")
33-
and not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages
35+
not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages
3436
3537
- name: "Create Sites."
3638
ansible.builtin.command: "omd -V {{ item.version }}.{{ item.edition }} create --no-tmpfs --admin-password {{ checkmk_var_automation_secret }} {{ item.site }}"
3739
args:
3840
creates: "/omd/sites/{{ item.site }}"
3941
loop: "{{ checkmk_var_test_sites }}"
40-
when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre"
4142

4243
- name: "Start Apache2."
4344
ansible.builtin.service:
@@ -49,12 +50,10 @@
4950
register: __checkmk_var_site_status
5051
changed_when: __checkmk_var_site_status.rc == "0"
5152
loop: "{{ checkmk_var_test_sites }}"
52-
when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre"
5353

5454
- name: "Wait for site to be ready."
5555
ansible.builtin.pause:
5656
seconds: 5
5757
when: |
58-
((checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.item.edition == 'cre')
59-
and (item.stdout_lines is defined and 'OVERALL 1' in item.stdout_lines)
58+
item.stdout_lines is defined and 'OVERALL 1' in item.stdout_lines
6059
loop: "{{ __checkmk_var_site_status.results }}"

tests/integration/targets/activation/tasks/main.yml

+11
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@
1010
- /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/
1111
- tests/integration/files/includes/vars/
1212

13+
- name: "Run preparations."
14+
ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}"
15+
vars:
16+
checkmk_var_params:
17+
files:
18+
- prep.yml
19+
paths:
20+
- /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/
21+
- /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/
22+
- tests/integration/files/includes/tasks/
23+
1324
- name: "Testing."
1425
ansible.builtin.include_tasks: test.yml
1526
loop: "{{ checkmk_var_test_sites }}"

0 commit comments

Comments
 (0)