@@ -244,6 +244,8 @@ func Test_parseRedisMetadata(t *testing.T) {
244244 testProperties := make (map [string ]string )
245245 testProperties ["redisHost" ] = "testHost"
246246 testProperties ["redisPassword" ] = "testPassword"
247+ testProperties ["sentinelUsername" ] = "testSentinelUsername"
248+ testProperties ["sentinelPassword" ] = "testSentinelPassword"
247249 testProperties ["enableTLS" ] = "true"
248250 testProperties ["redisMaxRetries" ] = "10"
249251 testProperties ["redisMaxRetryInterval" ] = "100ms"
@@ -254,6 +256,8 @@ func Test_parseRedisMetadata(t *testing.T) {
254256 testSettings := redisComponent.Settings {
255257 Host : "testHost" ,
256258 Password : "testPassword" ,
259+ SentinelUsername : "testSentinelUsername" ,
260+ SentinelPassword : "testSentinelPassword" ,
257261 EnableTLS : true ,
258262 RedisMaxRetries : 10 ,
259263 RedisMaxRetryInterval : redisComponent .Duration (100 * time .Millisecond ),
@@ -268,6 +272,8 @@ func Test_parseRedisMetadata(t *testing.T) {
268272 defaultSettings := redisComponent.Settings {
269273 Host : "testHost" ,
270274 Password : "" ,
275+ SentinelUsername : "" ,
276+ SentinelPassword : "" ,
271277 EnableTLS : false ,
272278 RedisMaxRetries : 3 ,
273279 RedisMaxRetryInterval : redisComponent .Duration (time .Second * 2 ),
@@ -311,6 +317,8 @@ func Test_parseRedisMetadata(t *testing.T) {
311317 }
312318 assert .Equal (t , tt .want .Host , got .Host )
313319 assert .Equal (t , tt .want .Password , got .Password )
320+ assert .Equal (t , tt .want .SentinelUsername , got .SentinelUsername )
321+ assert .Equal (t , tt .want .SentinelPassword , got .SentinelPassword )
314322 assert .Equal (t , tt .want .EnableTLS , got .EnableTLS )
315323 assert .Equal (t , tt .want .RedisMaxRetries , got .RedisMaxRetries )
316324 assert .Equal (t , tt .want .RedisMaxRetryInterval , got .RedisMaxRetryInterval )
0 commit comments