diff --git a/tests/integration/gcp_dns_resource_record_set/tasks/main.yml b/tests/integration/gcp_dns_resource_record_set/tasks/main.yml index 3daaccc..ce4c8e9 100644 --- a/tests/integration/gcp_dns_resource_record_set/tasks/main.yml +++ b/tests/integration/gcp_dns_resource_record_set/tasks/main.yml @@ -68,7 +68,7 @@ - name: verify that command succeeded assert: that: - - results['items'] | length >= 2 + - "'www.testzone-4.com.'in \"{{ results['items'] | map(attribute='name') | list }}\"" # ---------------------------------------------------------------------------- - name: create a resource record set that already exists gcp_dns_resource_record_set: @@ -121,7 +121,7 @@ - name: verify that command succeeded assert: that: - - results['items'] | length >= 2 + - "'www.testzone-4.com.'not in \"{{ results['items'] | map(attribute='name') | list }}\"" # ---------------------------------------------------------------------------- - name: delete a resource record set that does not exist gcp_dns_resource_record_set: diff --git a/tests/integration/gcp_sql_database/tasks/main.yml b/tests/integration/gcp_sql_database/tasks/main.yml index a7d1ddd..5321004 100644 --- a/tests/integration/gcp_sql_database/tasks/main.yml +++ b/tests/integration/gcp_sql_database/tasks/main.yml @@ -65,7 +65,7 @@ - name: verify that command succeeded assert: that: - - results['items'] | length >= 1 + - "\"{{resource_name}}\" in \"{{ results['items'] | map(attribute='name') | list }}\"" # ---------------------------------------------------------------------------- - name: create a database that already exists gcp_sql_database: @@ -110,7 +110,7 @@ - name: verify that command succeeded assert: that: - - results['items'] | length == 0 + - "\"{{resource_name}}\" not in \"{{ results['items'] | map(attribute='name') | list }}\"" # ---------------------------------------------------------------------------- - name: delete a database that does not exist gcp_sql_database: diff --git a/tests/integration/gcp_sql_user/tasks/main.yml b/tests/integration/gcp_sql_user/tasks/main.yml index 66f81ac..653308c 100644 --- a/tests/integration/gcp_sql_user/tasks/main.yml +++ b/tests/integration/gcp_sql_user/tasks/main.yml @@ -67,7 +67,7 @@ - name: verify that command succeeded assert: that: - - results['items'] | length >= 1 + - "'test-user' in \"{{ results['items'] | map(attribute='name') | list }}\"" # ---------------------------------------------------------------------------- - name: create a user that already exists gcp_sql_user: