Skip to content

Commit e56d7b5

Browse files
committed
tests: config_format_yaml: Fix failing tests
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent 613cd6d commit e56d7b5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/internal/config_format_yaml.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static void test_processors()
489489
sampling_percentage = cfl_kvlist_fetch(sampling_settings->data.as_kvlist,
490490
"sampling_percentage");
491491
TEST_CHECK(sampling_percentage != NULL);
492-
TEST_CHECK(sampling_percentage->type == CFL_VARIANT_INT);
492+
TEST_CHECK(sampling_percentage->type == CFL_VARIANT_UINT);
493493
TEST_CHECK(sampling_percentage->data.as_int64 == 25);
494494
}
495495
}
@@ -892,8 +892,10 @@ static void test_metadata_section()
892892

893893
v = flb_cf_section_property_get(cf, s, "config_version");
894894
TEST_CHECK(v != NULL);
895-
TEST_CHECK(v->type == CFL_VARIANT_STRING);
896-
TEST_CHECK(strcmp(v->data.as_string, "12345") == 0);
895+
TEST_CHECK(v->type == CFL_VARIANT_UINT);
896+
if (v != NULL && v->type == CFL_VARIANT_UINT) {
897+
TEST_CHECK(v->data.as_uint64 == 12345);
898+
}
897899

898900
v = flb_cf_section_property_get(cf, s, "annotations");
899901
TEST_CHECK(v != NULL);

0 commit comments

Comments
 (0)