using a better jinja2 filter to make tests less flakey (#294)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-07-01 17:02:57 -07:00 committed by Alex Stephen
commit 50d10946f7
10 changed files with 20 additions and 20 deletions

View file

@ -50,7 +50,7 @@
- name: verify that command succeeded
assert:
that:
- results['resources'] | length >= 1
- results['resources'] | map(attribute='name') | select("match", ".*My Sample Project.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a project that already exists
gcp_resourcemanager_project:
@ -94,7 +94,7 @@
- name: verify that command succeeded
assert:
that:
- results['resources'] | length == 0
- results['resources'] | map(attribute='name') | select("match", ".*My Sample Project.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a project that does not exist
gcp_resourcemanager_project: