diff options
author | Henning Baldersheim <balder@oath.com> | 2018-09-26 08:44:03 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-09-26 08:44:03 +0200 |
commit | 00d75be4343bbdd95175ab12aaa388944e10ba55 (patch) | |
tree | 8e4cf6936479e2407229aced16ee3169062efca8 /vespalib | |
parent | 00ec7d6b50cada563c42fbc4b7d94435ee8bf118 (diff) |
Add simple usage test for vespa-drop-file-from-cache
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/drop-file-from-cache/CMakeLists.txt | 8 | ||||
-rw-r--r-- | vespalib/src/tests/drop-file-from-cache/drop_file_from_cache_test.cpp | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/vespalib/src/tests/drop-file-from-cache/CMakeLists.txt b/vespalib/src/tests/drop-file-from-cache/CMakeLists.txt new file mode 100644 index 00000000000..d6f4a51a4c5 --- /dev/null +++ b/vespalib/src/tests/drop-file-from-cache/CMakeLists.txt @@ -0,0 +1,8 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +vespa_add_executable(vespalib_drop_file_from_cache_test_app TEST + SOURCES + drop_file_from_cache_test.cpp + DEPENDS + vespalib +) +vespa_add_test(NAME vespalib_drop_file_from_cache_test_app COMMAND vespalib_drop_file_from_cache_test_app) diff --git a/vespalib/src/tests/drop-file-from-cache/drop_file_from_cache_test.cpp b/vespalib/src/tests/drop-file-from-cache/drop_file_from_cache_test.cpp new file mode 100644 index 00000000000..efdc81ab6d0 --- /dev/null +++ b/vespalib/src/tests/drop-file-from-cache/drop_file_from_cache_test.cpp @@ -0,0 +1,13 @@ +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +#include <vespa/vespalib/testkit/test_kit.h> +#include <vespa/vespalib/util/slaveproc.h> + +using vespalib::SlaveProc; + +TEST("simple run") { + std::string out; + EXPECT_TRUE(SlaveProc::run("../../apps/vespa-drop-file-from-cache/vespa-drop-file-from-cache", out)); + EXPECT_EQUAL(out, "foo"); +} + +TEST_MAIN_WITH_PROCESS_PROXY() { TEST_RUN_ALL(); } |