From 8cf6c2b749beb6bbb634296f229110c3c666f594 Mon Sep 17 00:00:00 2001 From: Laurent Indermuehle Date: Mon, 18 Nov 2024 09:58:11 +0100 Subject: [PATCH] Add tests for all values --- .../test_mysql_info/tasks/filter_databases.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/integration/targets/test_mysql_info/tasks/filter_databases.yml b/tests/integration/targets/test_mysql_info/tasks/filter_databases.yml index be0091a..da1058b 100644 --- a/tests/integration/targets/test_mysql_info/tasks/filter_databases.yml +++ b/tests/integration/targets/test_mysql_info/tasks/filter_databases.yml @@ -51,6 +51,7 @@ result.databases['db_tables_count_2'].size != 32768 or result.databases['db_tables_count_2'].tables != 2 or result.databases['db_only_views'].size != 0 or + result.databases['db_only_views'].tables != 1 or 'db_tables_count_empty' in result.databases | dict2items | map(attribute='key') @@ -64,7 +65,11 @@ failed_when: - > result.databases['db_tables_count_1'].size is defined or + result.databases['db_tables_count_1'].tables != 1 or result.databases['db_tables_count_2'].size is defined or + result.databases['db_tables_count_2'].tables != 2 or + result.databases['db_only_views'].size is defined or + result.databases['db_only_views'].tables != 1 or 'db_tables_count_empty' in result.databases | dict2items | map(attribute='key') @@ -82,7 +87,11 @@ failed_when: - > result.databases['db_tables_count_1'].size is defined or + result.databases['db_tables_count_1'].tables != 1 or result.databases['db_tables_count_2'].size is defined or + result.databases['db_tables_count_2'].tables != 2 or + result.databases['db_only_views'].size is defined or + result.databases['db_only_views'].tables != 1 or 'db_tables_count_empty' in result.databases | dict2items | map(attribute='key') @@ -95,8 +104,12 @@ register: result failed_when: - > + result.databases['db_tables_count_1'].size != 16384 or result.databases['db_tables_count_1'].tables is defined or + result.databases['db_tables_count_2'].size != 32768 or result.databases['db_tables_count_2'].tables is defined or + result.databases['db_only_views'].size != 0 or + result.databases['db_only_views'].tables is defined or 'db_tables_count_empty' in result.databases | dict2items | map(attribute='key') @@ -112,6 +125,8 @@ result.databases['db_tables_count_1'].tables != 1 or result.databases['db_tables_count_2'].size != 32768 or result.databases['db_tables_count_2'].tables != 2 or + result.databases['db_only_views'].size != 0 or + result.databases['db_only_views'].tables != 1 or result.databases['db_tables_count_empty'].size != 0 or result.databases['db_tables_count_empty'].tables != 0 @@ -129,6 +144,8 @@ result.databases['db_tables_count_1'].tables != 1 or result.databases['db_tables_count_2'].size is defined or result.databases['db_tables_count_2'].tables != 2 or + result.databases['db_only_views'].size is defined or + result.databases['db_only_views'].tables != 1 or result.databases['db_tables_count_empty'].size is defined or result.databases['db_tables_count_empty'].tables != 0