Skip to content

Commit

Permalink
fix(libsinsp_e2e): restore docker socket path after test
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo authored and poiana committed Oct 8, 2024
1 parent 31effd8 commit e15d956
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/libsinsp_e2e/container/container_cri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ void container_cri::fake_cri_test(
inspector->set_cri_extra_queries(extra_queries);
};

EXPECT_NO_FATAL_FAILURE({ event_capture::run(test, cri_callback, filter, setup); });
after_capture_t cleanup = [&](sinsp* inspector) {
inspector->set_docker_socket_path(default_docker_socket);
};

EXPECT_NO_FATAL_FAILURE({ event_capture::run(test, cri_callback, filter, setup, cleanup); });

// The fake server had to stay running the whole time in order
// for the test to be succesful
Expand Down

0 comments on commit e15d956

Please sign in to comment.