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 ab3e770
Show file tree
Hide file tree
Showing 2 changed files with 9 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.

6 changes: 4 additions & 2 deletions test/integration/redisfailover/creation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,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 +180,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 +249,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, sentinelPort)

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

View workflow job for this annotation

GitHub Actions / Integration test (1.24.16)

cannot use sentinelPort (untyped int constant 26379) as string value in argument to c.redisClient.GetSentinelMonitor
masters = append(masters, master)
}

Expand Down

0 comments on commit ab3e770

Please sign in to comment.