summaryrefslogtreecommitdiffstats
path: root/test/legacy/roles/test_gce_labels/tasks/test.yml
blob: 605009efaf7d9ee94a922b7d5aa0b0ce3c84ae54 (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
25
26
27
28
# GCE Labels Integration Tests.

## Parameter checking tests ##
# ============================================================
- name: "test unknown resource_type"
  gce_labels:
    service_account_email: "{{ service_account_email }}"
    pem_file: "{{ pem_file }}"
    project_id: "{{ project_id }}"
    resource_type: doggie
    resource_location: Kansas
    resource_name: Toto
    labels:
      environment: dev
      experiment: kennedy
  register: result
  ignore_errors: true
  labels:
    - param-check

- name: "assert failure when param: unknown resource_type"
  assert:
    that:
       - 'result.failed'
       - 'result.msg == "Unsupported resource_type: doggie"'


# TODO(erjohnso): write more tests