diff --git a/operator/redisfailover/service/generator_test.go b/operator/redisfailover/service/generator_test.go index 7c7cc62dd..8c3ee0574 100644 --- a/operator/redisfailover/service/generator_test.go +++ b/operator/redisfailover/service/generator_test.go @@ -1709,7 +1709,7 @@ func TestRedisEnv(t *testing.T) { expectedRedisEnv: []corev1.EnvVar{ { Name: "REDIS_ADDR", - Value: fmt.Sprintf("redis://localhost:%[1]v", default_port), + Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port), }, { Name: "REDIS_PORT", @@ -1727,7 +1727,7 @@ func TestRedisEnv(t *testing.T) { expectedRedisEnv: []corev1.EnvVar{ { Name: "REDIS_ADDR", - Value: fmt.Sprintf("redis://localhost:%[1]v", default_port), + Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port), }, { Name: "REDIS_PORT",