X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Funit%2Fcore%2Fstore_lookup_test.c;h=8d1508641d1a59515f67f8ec516900483f44d970;hb=8075debb62385a01df5b8d344ad590cf0575c2eb;hp=dbf313acaa6709119b84d2d6636b61b5b57b233c;hpb=6d0d1e3ef653bb23cb76e3330dc58c49257c8573;p=sysdb.git diff --git a/t/unit/core/store_lookup_test.c b/t/unit/core/store_lookup_test.c index dbf313a..8d15086 100644 --- a/t/unit/core/store_lookup_test.c +++ b/t/unit/core/store_lookup_test.c @@ -529,28 +529,33 @@ START_TEST(test_scan) { "host =~ 'a|b'", NULL, 2 }, { "host =~ 'host'", NULL, 0 }, { "host =~ '.'", NULL, 3 }, - { "metric = 'm1'", NULL, 2 }, - { "metric= 'm1'", "host = 'x'", 0 }, /* filter never matches */ - { "metric = 'm1'", + { "ANY metric = 'm1'", NULL, 2 }, + { "ANY metric= 'm1'", "host = 'x'", 0 }, /* filter never matches */ + { "ANY metric = 'm1'", "NOT attribute['x'] = ''", 2 }, /* filter always matches */ - { "metric =~ 'm'", NULL, 2 }, - { "metric !~ 'm'", NULL, 1 }, - { "metric =~ 'x'", NULL, 0 }, - { "service = 's1'", NULL, 2 }, - { "service = 's1'", "host = 'x'", 0 }, /* filter never matches */ - { "service = 's1'", + { "ANY metric =~ 'm'", NULL, 2 }, + { "ALL metric =~ 'm'", NULL, 3 }, + { "ALL metric =~ '1'", NULL, 2 }, + { "ALL metric =~ '2'", NULL, 1 }, + { "ANY metric !~ 'm'", NULL, 0 }, + { "ALL metric !~ 'm'", NULL, 1 }, + { "ANY metric =~ 'x'", NULL, 0 }, + { "ANY service = 's1'", NULL, 2 }, + { "ANY service = 's1'", "host = 'x'", 0 }, /* filter never matches */ + { "ANY service = 's1'", "NOT attribute['x'] = ''", 2 }, /* filter always matches */ - { "service =~ 's'", NULL, 2 }, - { "service !~ 's'", NULL, 1 }, - { "attribute = 'k1'", NULL, 2 }, - { "attribute = 'k1'", "host = 'x'", 0 }, /* filter never matches */ - { "attribute = 'k1'", + { "ANY service =~ 's'", NULL, 2 }, + { "ANY service !~ 's'", NULL, 0 }, + { "ANY attribute = 'k1'", NULL, 2 }, + { "ANY attribute = 'k1'", "host = 'x'",0 }, /* filter never matches */ + { "ANY attribute = 'k1'", "NOT attribute['x'] = ''", 2 }, /* filter always matches */ - { "attribute =~ 'k'", NULL, 2 }, - { "attribute =~ '1'", NULL, 2 }, - { "attribute =~ '2'", NULL, 1 }, - { "attribute = 'x'", NULL, 0 }, - { "attribute =~ 'x'", NULL, 0 }, + { "ANY attribute =~ 'k'", NULL, 2 }, + { "ANY attribute =~ '1'", NULL, 2 }, + { "ANY attribute =~ '2'", NULL, 1 }, + { "ANY attribute = 'x'", NULL, 0 }, + { "ANY attribute =~ 'x'", NULL, 0 }, + { "ALL attribute = 'k1'", NULL, 2 }, { "attribute['k1'] = 'v1'", NULL, 1 }, { "attribute['k1'] =~ 'v1'", NULL, 1 }, { "attribute['k1'] =~ '^v1$'", NULL, 1 }, @@ -574,8 +579,8 @@ START_TEST(test_scan) { "attribute['k2'] != 123", NULL, 0 }, { "attribute['k1'] != 'v1'", NULL, 1 }, { "attribute['k1'] != 'v2'", NULL, 1 }, - { "attribute != 'x' " - "AND attribute['y'] !~ 'x'", NULL, 3 }, + { "ANY attribute != 'x' " + "AND attribute['y'] !~ 'x'", NULL, 2 }, }; int check, n;