Added assertions on endpoint module results

Signed-off-by: Jakob Meng <code@jakobmeng.de>
Change-Id: If8befd62ac59ef19debf0d63abe76f11b47c2da3
This commit is contained in:
Jakob Meng 2022-07-12 10:39:33 +02:00
parent a120db2d60
commit 070e77feca
2 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1,9 @@
expected_fields:
- id
- interface
- is_enabled
- links
- name
- region_id
- service_id
- url

View File

@ -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: