Added assertions on endpoint module results
Signed-off-by: Jakob Meng <code@jakobmeng.de> Change-Id: If8befd62ac59ef19debf0d63abe76f11b47c2da3
This commit is contained in:
parent
a120db2d60
commit
070e77feca
9
ci/roles/endpoint/defaults/main.yaml
Normal file
9
ci/roles/endpoint/defaults/main.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
expected_fields:
|
||||
- id
|
||||
- interface
|
||||
- is_enabled
|
||||
- links
|
||||
- name
|
||||
- region_id
|
||||
- service_id
|
||||
- url
|
@ -9,10 +9,13 @@
|
||||
state: present
|
||||
register: endpoint_test
|
||||
|
||||
- name: Ensure service endpoint was created
|
||||
- debug: var=endpoint_test
|
||||
|
||||
- name: Assert return values of endpoint module
|
||||
assert:
|
||||
that:
|
||||
- endpoint_test.endpoint.id is defined
|
||||
# allow new fields to be introduced but prevent fields from being removed
|
||||
- expected_fields|difference(endpoint_test.endpoint.keys())|length == 0
|
||||
|
||||
- name: Ensure service have the proper endpoint
|
||||
assert:
|
||||
|
Loading…
Reference in New Issue
Block a user