Skip to content

Commit cd5490e

Browse files
committed
fix(k8smeta): update libs version used in tests to 0.22.0 and fix tests
Signed-off-by: Iacopo Rozzo <[email protected]>
1 parent 8405b62 commit cd5490e

File tree

3 files changed

+190
-127
lines changed

3 files changed

+190
-127
lines changed

plugins/k8smeta/cmake/modules/libs.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ message(STATUS "Fetching libs at 'https://github.com/falcosecurity/libs.git'")
44
FetchContent_Declare(
55
libs
66
GIT_REPOSITORY https://github.com/falcosecurity/libs.git
7-
GIT_TAG 0.20.0
7+
GIT_TAG 0.22.0
88
CONFIGURE_COMMAND "" BUILD_COMMAND "")
99

1010
FetchContent_Populate(libs)

plugins/k8smeta/test/src/check_events.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,14 @@ TEST_F(sinsp_with_test_input, plugin_k8s_content_of_async_events)
287287
ASSERT_EQ(evt->get_tid(), -1);
288288
ASSERT_EQ(evt->get_source_idx(), 0);
289289
ASSERT_EQ(std::string(evt->get_source_name()), "syscall");
290-
ASSERT_STREQ(evt->get_param(1)->m_val, "k8s");
290+
ASSERT_EQ(evt->get_param(1)->as<std::string>(), "k8s");
291291

292292
// Check that the content of the event is right
293293
// We need to compare the json because the dumped strings could be
294294
// out of order
295295
ASSERT_EQ(extractor.get_json_event(num_async_events),
296-
nlohmann::json::parse(evt->get_param(2)->m_val));
296+
nlohmann::json::parse(
297+
evt->get_param(2)->as<std::string>()));
297298
num_async_events++;
298299
}
299300
}

0 commit comments

Comments
 (0)