summaryrefslogtreecommitdiff
path: root/test/integration/targets/memset_dns_reload/tasks/main.yml
blob: b2dcad599c2a2d27a5c1acce4d75f67d54145017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
- name: request reload with invalid API key
  memset_dns_reload:
    api_key: "wa9aerahhie0eekee9iaphoorovooyia"
  ignore_errors: true
  register: result

- name: check API response with invalid API key
  assert:
    that:
      - "'Memset API returned a 403 response (ApiErrorForbidden, Bad api_key)' in result.msg"
      - result is not successful

- name: request reload and poll
  memset_dns_reload:
    api_key: "{{ api_key }}"
    poll: true
  register: result

- name: check reload succeeded
  assert:
    that:
      - result is changed
      - result is successful