Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generated mocks #22

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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