|
@@ -672,15 +672,17 @@ TEST_F(CfgMgrTest, echoClientId) {
|
|
|
|
|
|
// This test checks the D2ClientMgr wrapper methods.
|
|
|
TEST_F(CfgMgrTest, d2ClientConfig) {
|
|
|
- // After CfgMgr construction, D2 configuration should be disabled.
|
|
|
- // Fetch it and verify this is the case.
|
|
|
+ // After CfgMgr construction, D2ClientMgr member should be initialized
|
|
|
+ // with a D2 configuration that is disabled.
|
|
|
+ // Verify we can Fetch the mgr.
|
|
|
+ D2ClientMgr d2_mgr = CfgMgr::instance().getD2ClientMgr();
|
|
|
+ EXPECT_FALSE(d2_mgr.ddnsEnabled());
|
|
|
+
|
|
|
+ // Make sure the convenience method fetches the config correctly.
|
|
|
D2ClientConfigPtr original_config = CfgMgr::instance().getD2ClientConfig();
|
|
|
ASSERT_TRUE(original_config);
|
|
|
EXPECT_FALSE(original_config->getEnableUpdates());
|
|
|
|
|
|
- // Make sure convenience method agrees.
|
|
|
- EXPECT_FALSE(CfgMgr::instance().ddnsEnabled());
|
|
|
-
|
|
|
// Verify that we cannot set the configuration to an empty pointer.
|
|
|
D2ClientConfigPtr new_cfg;
|
|
|
ASSERT_THROW(CfgMgr::instance().setD2ClientConfig(new_cfg), D2ClientError);
|