+
+TEST_F(DatabaseConfigurationImplTest, DefaultSentinelAddressIsNone)
+{
+ EXPECT_EQ(boost::none, databaseConfigurationImpl->getSentinelAddress());
+}
+
+TEST_F(DatabaseConfigurationImplTest, CanApplyAndReturnSentinelAddress)
+{
+ databaseConfigurationImpl->checkAndApplySentinelAddress("dummydatabaseaddress.local:1234");
+ auto address = databaseConfigurationImpl->getSentinelAddress();
+ EXPECT_NE(boost::none, databaseConfigurationImpl->getSentinelAddress());
+ EXPECT_EQ("dummydatabaseaddress.local", address->getHost());
+ EXPECT_EQ(1234, ntohs(address->getPort()));
+}
+
+TEST_F(DatabaseConfigurationImplTest, DefaultSentinelMasterNameIsEmpty)
+{
+ EXPECT_EQ("", databaseConfigurationImpl->getSentinelMasterName());
+}
+
+TEST_F(DatabaseConfigurationImplTest, CanApplyAndReturnSentinelMasterName)
+{
+ databaseConfigurationImpl->checkAndApplySentinelMasterName("mymaster");
+ EXPECT_EQ("mymaster", databaseConfigurationImpl->getSentinelMasterName());
+}