Skip to content

Commit

Permalink
cleanup: use s3 folder for sample.scap
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
  • Loading branch information
Andreagit97 committed Aug 27, 2024
1 parent 6d327b3 commit 1ba779a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions userspace/libsinsp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ if((NOT ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "s390x") AND ${SCAP_FILES_SUITE_
set(SCAP_FILE_NAMES
"kexec_arm64.scap"
"kexec_x86.scap"
"sample.scap"
)
set(SCAP_FILE_DOWNLOAD_PREFIX
"https://download.falco.org/fixtures/libs/scap_files"
Expand Down
4 changes: 1 addition & 3 deletions userspace/libsinsp/test/libsinsp_test_var.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once

// Absolute path to the scap files dir
#define LIBSINSP_TEST_SCAP_FILES_DIR "${CMAKE_BINARY_DIR}/scap_files/"

#define LIBSINSP_TMP_TEST_SCAP_FILES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources/"
#define LIBSINSP_TEST_SCAP_FILES_DIR "${CMAKE_BINARY_DIR}/scap_files/"
Binary file removed userspace/libsinsp/test/resources/sample.scap
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST(scap_file, filter)
{
sinsp inspector;
inspector.set_filter("proc.name=ifplugd");
inspector.open_savefile(LIBSINSP_TMP_TEST_SCAP_FILES_DIR "/sample.scap");
inspector.open_savefile(LIBSINSP_TEST_SCAP_FILES_DIR "/sample.scap");

auto dumper = std::make_unique<sinsp_cycledumper>(&inspector, tmp_scap_file_name, 0, 0, 0, 0, true);

Expand Down Expand Up @@ -78,7 +78,7 @@ TEST(scap_file, cycledumper_num_events)
std::string tmp_scap_file_name = tmp_scap_file_path.string();
{
sinsp inspector;
inspector.open_savefile(LIBSINSP_TMP_TEST_SCAP_FILES_DIR "/sample.scap");
inspector.open_savefile(LIBSINSP_TEST_SCAP_FILES_DIR "/sample.scap");

auto dumper = std::make_unique<sinsp_cycledumper>(&inspector, tmp_scap_file_name, 0, 0, 0,
events_per_capture, true);
Expand Down Expand Up @@ -119,7 +119,7 @@ TEST(scap_file, cycledumper_seconds)
std::string tmp_scap_file_name = tmp_scap_file_path.string();
{
sinsp inspector;
inspector.open_savefile(LIBSINSP_TMP_TEST_SCAP_FILES_DIR "/sample.scap");
inspector.open_savefile(LIBSINSP_TEST_SCAP_FILES_DIR "/sample.scap");

auto dumper = std::make_unique<sinsp_cycledumper>(&inspector, tmp_scap_file_name, 0,
seconds_per_capture, 0, 0, true);
Expand Down

0 comments on commit 1ba779a

Please sign in to comment.