diff options
author | Henning Baldersheim <balder@oath.com> | 2018-01-29 19:37:39 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-01-29 19:37:39 +0000 |
commit | f6169d507a61fec1fea428c5e315dac4b4cf3398 (patch) | |
tree | b97f3621927eec291db140abcaa770fc0249bd4e /searchcore/src/tests/proton/documentdb | |
parent | 5cb5a8aaf304d5d1dc19ad994b92b644d204bae4 (diff) |
Remove the support for extra config, that is a leftover from rise integration that is long gone.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp index a781085769c..6b1031fe558 100644 --- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp +++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp @@ -37,9 +37,8 @@ DocumentDBConfig::SP makeBaseConfigSnapshot() { config::DirSpec spec(TEST_PATH("cfg")); - ConfigKeySet extraKeySet; - extraKeySet.add<MycfgConfig>(""); - DBCM dbcm(spec, "test", extraKeySet); + + DBCM dbcm(spec, "test"); DocumenttypesConfigSP dtcfg(config::ConfigGetter<DocumenttypesConfig>::getConfig("", spec).release()); BootstrapConfig::SP b(new BootstrapConfig(1, dtcfg, @@ -73,19 +72,6 @@ makeEmptyConfigSnapshot() void incInt(int *i, const DocumentType&) { ++*i; } void -assertEqualExtraConfigs(const DocumentDBConfig &expSnap, const DocumentDBConfig &actSnap) -{ - const ConfigSnapshot &exp = expSnap.getExtraConfigs(); - const ConfigSnapshot &act = actSnap.getExtraConfigs(); - EXPECT_EQUAL(1u, exp.size()); - EXPECT_EQUAL(1u, act.size()); - std::unique_ptr<MycfgConfig> expCfg = exp.getConfig<MycfgConfig>(""); - std::unique_ptr<MycfgConfig> actCfg = act.getConfig<MycfgConfig>(""); - EXPECT_EQUAL("foo", expCfg->myField); - EXPECT_EQUAL("foo", actCfg->myField); -} - -void assertEqualSnapshot(const DocumentDBConfig &exp, const DocumentDBConfig &act) { EXPECT_TRUE(exp.getRankProfilesConfig() == act.getRankProfilesConfig()); @@ -109,7 +95,6 @@ assertEqualSnapshot(const DocumentDBConfig &exp, const DocumentDBConfig &act) EXPECT_TRUE(*exp.getSchemaSP() == *act.getSchemaSP()); EXPECT_EQUAL(expTypeCount, actTypeCount); EXPECT_EQUAL(exp.getConfigId(), act.getConfigId()); - assertEqualExtraConfigs(exp, act); } DocumentDBConfig::SP @@ -163,13 +148,12 @@ TEST_F("requireThatConfigCanBeSerializedAndDeserialized", DocumentDBConfig::SP(m TEST_F("requireThatConfigCanBeLoadedWithoutExtraConfigsDataFile", DocumentDBConfig::SP(makeBaseConfigSnapshot())) { saveBaseConfigSnapshot(*f, 70); - EXPECT_TRUE(vespalib::unlink("out/config-70/extraconfigs.dat")); + EXPECT_FALSE(vespalib::unlink("out/config-70/extraconfigs.dat")); DocumentDBConfig::SP esnap(makeEmptyConfigSnapshot()); { FileConfigManager cm("out", myId, "dummy"); cm.loadConfig(*esnap, 70, esnap); } - EXPECT_EQUAL(0u, esnap->getExtraConfigs().size()); } @@ -187,11 +171,9 @@ TEST_F("requireThatVisibilityDelayIsPropagated", protonConfigBuilder.maxvisibilitydelay = 100.0; FileConfigManager cm("out", myId, "dummy"); using ProtonConfigSP = BootstrapConfig::ProtonConfigSP; - cm.setProtonConfig( - ProtonConfigSP(new ProtonConfig(protonConfigBuilder))); + cm.setProtonConfig(ProtonConfigSP(new ProtonConfig(protonConfigBuilder))); cm.loadConfig(*esnap, 70, esnap); } - EXPECT_EQUAL(0u, esnap->getExtraConfigs().size()); EXPECT_EQUAL(61.0, esnap->getMaintenanceConfigSP()->getVisibilityDelay().sec()); } |