diff options
author | Geir Storli <geirst@yahoo-inc.com> | 2016-09-02 15:28:00 +0200 |
---|---|---|
committer | Geir Storli <geirst@yahoo-inc.com> | 2016-09-05 16:02:34 +0200 |
commit | b76f2d2d53edce2da961e14399d369675d0b6246 (patch) | |
tree | d18b8c8d51a210cc701d54546faabe506b2f33e5 /searchcore/src/tests/proton/documentdb/documentdbconfig | |
parent | 0f4449ac5daba3e077ed22755ef803c8ec5dfe47 (diff) |
Remove RankingConstantsConfig from DocumentDBConfig and add builder used in unit tests.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentdbconfig')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/documentdbconfig/CMakeLists.txt | 1 | ||||
-rw-r--r-- | searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp | 19 |
2 files changed, 4 insertions, 16 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/CMakeLists.txt b/searchcore/src/tests/proton/documentdb/documentdbconfig/CMakeLists.txt index 1ad3b7f21f6..ee339c1c145 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfig/CMakeLists.txt +++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/CMakeLists.txt @@ -3,6 +3,7 @@ vespa_add_executable(searchcore_documentdbconfig_test_app TEST SOURCES documentdbconfig_test.cpp DEPENDS + searchcore_test searchcore_server ) vespa_add_test(NAME searchcore_documentdbconfig_test_app COMMAND searchcore_documentdbconfig_test_app) diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp index 5cced5038c8..8fd10b49409 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp @@ -5,6 +5,7 @@ LOG_SETUP("documentdbconfig_test"); #include <vespa/searchcore/proton/server/documentdbconfig.h> +#include <vespa/searchcore/proton/test/documentdb_config_builder.h> #include <vespa/vespalib/testkit/testapp.h> using namespace document; @@ -26,22 +27,8 @@ getConfig(int64_t generation, const Schema::SP &schema, shared_ptr<DocumentTypeRepo> repo, const RankProfilesConfig &rankProfiles) { - return make_shared<DocumentDBConfig>( - generation, - make_shared<RankProfilesConfig>(rankProfiles), - make_shared<RankingConstantsConfig>(), - make_shared<matching::RankingConstants>(), - make_shared<IndexschemaConfig>(), - make_shared<AttributesConfig>(), - 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).rankProfiles(make_shared<RankProfilesConfig>(rankProfiles)).build(); } } |