Skip to content

Commit

Permalink
Fix generated mocks and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
indiebrain committed Nov 17, 2023
1 parent effd10b commit 3b32fab
Show file tree
Hide file tree
Showing 2 changed files with 10 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.

7 changes: 5 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,7 @@ func (c *clients) testSentinelMonitoring(t *testing.T) {

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

Check failure on line 253 in test/integration/redisfailover/creation_test.go

View workflow job for this annotation

GitHub Actions / Integration test (1.25.12)

too many arguments in conversion to int64
masters = append(masters, master)
}

Expand Down

0 comments on commit 3b32fab

Please sign in to comment.