Skip to content

Commit

Permalink
fixing a bug in lookup_folders integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgetwan committed Aug 30, 2023
1 parent 546f55e commit dc801ac
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions tests/integration/targets/lookup_folders/tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

- name: "Number of folders in vars"
ansible.builtin.debug:
msg: "{{ 1 + checkmk_folders|length }}"
msg: "{{ checkmk_folders|length }}"
delegate_to: localhost
run_once: true # noqa run-once[task]

Expand All @@ -66,9 +66,27 @@
delegate_to: localhost
run_once: true # noqa run-once[task]

- name: "Verify number of checkmk_folders."
ansible.builtin.assert:
that: "checkmk_folders|length == 4"

- name: "Verify number of folders."
ansible.builtin.assert:
that: "folders|length == 5"
vars:
folders: "{{ lookup('checkmk.general.folders',
recursive=True,
site_url=server_url + '/' + outer_item.site,
validate_certs=False,
automation_user=automation_user,
automation_secret=automation_secret)
}}"
delegate_to: localhost
run_once: true # noqa run-once[task]

- name: "Verify number of folders."
ansible.builtin.assert:
that: "1 + checkmk_folders|length == folders|length"
that: "( 1 + checkmk_folders|length ) == folders|length"
vars:
folders: "{{ lookup('checkmk.general.folders',
recursive=True,
Expand Down

0 comments on commit dc801ac

Please sign in to comment.