Skip to content

Commit 7ea8002

Browse files
author
Jamie Wiebe
committed
fix unit test
1 parent e703c51 commit 7ea8002

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

operator/redisfailover/service/generator_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,6 @@ func TestSentinelImagePullPolicy(t *testing.T) {
14881488
}
14891489

14901490
func TestRedisExtraVolumeMounts(t *testing.T) {
1491-
14921491
mode := int32(755)
14931492
tests := []struct {
14941493
name string
@@ -1564,7 +1563,6 @@ func TestRedisExtraVolumeMounts(t *testing.T) {
15641563
}
15651564

15661565
func TestSentinelExtraVolumeMounts(t *testing.T) {
1567-
15681566
mode := int32(755)
15691567
tests := []struct {
15701568
name string
@@ -1640,7 +1638,6 @@ func TestSentinelExtraVolumeMounts(t *testing.T) {
16401638
}
16411639

16421640
func TestCustomPort(t *testing.T) {
1643-
16441641
default_port := int32(6379)
16451642
custom_port := int32(12345)
16461643
tests := []struct {
@@ -1696,7 +1693,6 @@ func TestCustomPort(t *testing.T) {
16961693
}
16971694

16981695
func TestRedisEnv(t *testing.T) {
1699-
17001696
default_port := int32(6379)
17011697
tests := []struct {
17021698
name string
@@ -1709,7 +1705,7 @@ func TestRedisEnv(t *testing.T) {
17091705
expectedRedisEnv: []corev1.EnvVar{
17101706
{
17111707
Name: "REDIS_ADDR",
1712-
Value: fmt.Sprintf("redis://localhost:%[1]v", default_port),
1708+
Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port),
17131709
},
17141710
{
17151711
Name: "REDIS_PORT",
@@ -1727,7 +1723,7 @@ func TestRedisEnv(t *testing.T) {
17271723
expectedRedisEnv: []corev1.EnvVar{
17281724
{
17291725
Name: "REDIS_ADDR",
1730-
Value: fmt.Sprintf("redis://localhost:%[1]v", default_port),
1726+
Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port),
17311727
},
17321728
{
17331729
Name: "REDIS_PORT",

0 commit comments

Comments
 (0)