aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/documentdbconfigscout
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahoo-inc.com>2016-09-02 15:28:00 +0200
committerGeir Storli <geirst@yahoo-inc.com>2016-09-05 16:02:34 +0200
commitb76f2d2d53edce2da961e14399d369675d0b6246 (patch)
treed18b8c8d51a210cc701d54546faabe506b2f33e5 /searchcore/src/tests/proton/documentdb/documentdbconfigscout
parent0f4449ac5daba3e077ed22755ef803c8ec5dfe47 (diff)
Remove RankingConstantsConfig from DocumentDBConfig and add builder used in unit tests.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentdbconfigscout')
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdbconfigscout/CMakeLists.txt1
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp19
2 files changed, 4 insertions, 16 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/CMakeLists.txt b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/CMakeLists.txt
index 8de0cc67b2a..6b14919a253 100644
--- a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/CMakeLists.txt
+++ b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/CMakeLists.txt
@@ -3,6 +3,7 @@ vespa_add_executable(searchcore_documentdbconfigscout_test_app TEST
SOURCES
documentdbconfigscout_test.cpp
DEPENDS
+ searchcore_test
searchcore_server
searchcore_attribute
)
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp
index 57b77c5a0a5..25c55fa2dbc 100644
--- a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp
@@ -6,6 +6,7 @@ LOG_SETUP("documentdbconfigscout_test");
#include <vespa/searchcore/proton/server/documentdbconfig.h>
#include <vespa/searchcore/proton/server/documentdbconfigscout.h>
+#include <vespa/searchcore/proton/test/documentdb_config_builder.h>
#include <vespa/vespalib/testkit/testapp.h>
using namespace document;
@@ -27,22 +28,8 @@ getConfig(int64_t generation, const Schema::SP &schema,
shared_ptr<DocumentTypeRepo> repo,
const AttributesConfig &attributes)
{
- return make_shared<DocumentDBConfig>(
- generation,
- make_shared<RankProfilesConfig>(),
- make_shared<RankingConstantsConfig>(),
- make_shared<matching::RankingConstants>(),
- make_shared<IndexschemaConfig>(),
- make_shared<AttributesConfig>(attributes),
- make_shared<SummaryConfig>(),
- make_shared<SummarymapConfig>(),
- make_shared<summary::JuniperrcConfig>(),
- make_shared<DocumenttypesConfig>(),
- repo,
- make_shared<TuneFileDocumentDB>(),
- schema,
- make_shared<DocumentDBMaintenanceConfig>(),
- "client", "test");
+ return test::DocumentDBConfigBuilder(generation, schema, "client", "test").
+ repo(repo).attributes(make_shared<AttributesConfig>(attributes)).build();
}