summaryrefslogtreecommitdiffstats
path: root/searchcorespi/src/tests/plugin/plugin_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcorespi/src/tests/plugin/plugin_test.cpp')
-rw-r--r--searchcorespi/src/tests/plugin/plugin_test.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/searchcorespi/src/tests/plugin/plugin_test.cpp b/searchcorespi/src/tests/plugin/plugin_test.cpp
deleted file mode 100644
index 733c2834c24..00000000000
--- a/searchcorespi/src/tests/plugin/plugin_test.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/searchcorespi/plugin/factoryloader.h>
-#include <vespa/vespalib/util/exceptions.h>
-
-using namespace searchcorespi;
-
-namespace {
-TEST("require that plugins can be loaded.") {
- FactoryLoader fl;
- IIndexManagerFactory::UP f = fl.create("searchcorespi_tplugin");
- ASSERT_TRUE(f.get());
-}
-
-TEST("require that non-existent plugin causes failure") {
- FactoryLoader fl;
-#ifdef __APPLE__
- EXPECT_EXCEPTION(fl.create("no-such-plugin"),
- vespalib::IllegalArgumentException,
- "image not found");
-#else
- EXPECT_EXCEPTION(fl.create("no-such-plugin"),
- vespalib::IllegalArgumentException,
- "cannot open shared object file");
-#endif
-}
-
-TEST("require that missing factory function causes failure") {
- FactoryLoader fl;
- EXPECT_EXCEPTION(fl.create("searchcorespi_illegal-plugin"),
- vespalib::IllegalArgumentException,
- "Failed locating symbol 'createIndexManagerFactory'");
-}
-} // namespace
-
-TEST_MAIN() { TEST_RUN_ALL(); }