summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/jinja_plugins/tasks/main.yml
blob: d3d6e2e82d3b9aa61a2d05f9d271ad76f01bdb83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- shell: ansible-playbook {{ verbosity }} playbook.yml
  environment:
    ANSIBLE_FORCE_COLOR: no
  args:
    chdir: '{{ role_path }}'
  vars:
    verbosity: "{{ '' if not ansible_verbosity else '-' ~ ('v' * ansible_verbosity) }}"
  register: result

- debug:
    var: result

- set_fact:
    # NOTE: This will cram words together that were manually wrapped, which should be OK for this test.
    stderr: "{{ result.stderr | replace('\n', '') }}"

- assert:
    that:
      - '"[WARNING]: Skipping filter plugin" in stderr'
      - '"[WARNING]: Skipping test plugin" in stderr'
      - stderr|regex_findall('bad_collection_filter')|length == 3
      - stderr|regex_findall('bad_collection_filter2')|length == 1
      - stderr|regex_findall('bad_collection_test')|length == 2