Skip to content

Commit

Permalink
Merge pull request #22 from powerhome/aaronk--fix-generated-mocks
Browse files Browse the repository at this point in the history
Fix generated mocks
  • Loading branch information
indiebrain authored Nov 17, 2023
2 parents effd10b + 2ffdd05 commit ddb3bfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mocks/service/k8s/Services.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions test/integration/redisfailover/creation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"net"
"path/filepath"
"strconv"
"testing"
"time"

Expand Down Expand Up @@ -161,6 +162,8 @@ func TestRedisFailover(t *testing.T) {
t.Run("Check Sentinels Checking the Redis Master", clients.testSentinelMonitoring)
}

const sentinelPort = 26379

func (c *clients) testCRCreation(t *testing.T) {
assert := assert.New(t)
toCreate := &redisfailoverv1.RedisFailover{
Expand All @@ -178,7 +181,7 @@ func (c *clients) testCRCreation(t *testing.T) {
},
Sentinel: redisfailoverv1.SentinelSettings{
Replicas: sentinelSize,
Port: redisfailoverv1.Port(26379),
Port: redisfailoverv1.Port(sentinelPort),
},
Auth: redisfailoverv1.AuthSettings{
SecretPath: authSecretPath,
Expand Down Expand Up @@ -247,7 +250,9 @@ func (c *clients) testSentinelMonitoring(t *testing.T) {

for _, pod := range sentinelPodList.Items {
ip := pod.Status.PodIP
master, _, _ := c.redisClient.GetSentinelMonitor(ip)
port := strconv.FormatInt(int64(sentinelPort), 10)

master, _, _ := c.redisClient.GetSentinelMonitor(ip, port)
masters = append(masters, master)
}

Expand Down

0 comments on commit ddb3bfb

Please sign in to comment.