Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Gupta <[email protected]>
  • Loading branch information
shubham-cmyk committed Nov 10, 2023
1 parent 978de66 commit 3e35f1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions k8sutils/cluster-scaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ func getRedisClusterSlots(ctx context.Context, client kubernetes.Interface, logg

// getRedisNodeID would return nodeID of a redis node by passing pod
func getRedisNodeID(ctx context.Context, client kubernetes.Interface, logger logr.Logger, cr *redisv1beta2.RedisCluster, pod RedisDetails) string {
var redisClient *redis.Client
redisClient = configureRedisClient(client, logger, cr, pod.PodName)
redisClient := configureRedisClient(client, logger, cr, pod.PodName)
defer redisClient.Close()

Check warning on line 119 in k8sutils/cluster-scaling.go

View check run for this annotation

Codecov / codecov/patch

k8sutils/cluster-scaling.go#L117-L119

Added lines #L117 - L119 were not covered by tests

pong, err := redisClient.Ping(ctx).Result()

Check warning on line 121 in k8sutils/cluster-scaling.go

View check run for this annotation

Codecov / codecov/patch

k8sutils/cluster-scaling.go#L121

Added line #L121 was not covered by tests
Expand Down
3 changes: 1 addition & 2 deletions k8sutils/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ func ExecuteRedisReplicationCommand(ctx context.Context, client kubernetes.Inter

// checkRedisCluster will check the redis cluster have sufficient nodes or not
func checkRedisCluster(ctx context.Context, client kubernetes.Interface, logger logr.Logger, cr *redisv1beta2.RedisCluster) [][]string {
var redisClient *redis.Client
redisClient = configureRedisClient(client, logger, cr, cr.ObjectMeta.Name+"-leader-0")
redisClient := configureRedisClient(client, logger, cr, cr.ObjectMeta.Name+"-leader-0")
defer redisClient.Close()

Check warning on line 206 in k8sutils/redis.go

View check run for this annotation

Codecov / codecov/patch

k8sutils/redis.go#L204-L206

Added lines #L204 - L206 were not covered by tests
cmd := redis.NewStringCmd(ctx, "cluster", "nodes")
err := redisClient.Process(ctx, cmd)

Check warning on line 208 in k8sutils/redis.go

View check run for this annotation

Codecov / codecov/patch

k8sutils/redis.go#L208

Added line #L208 was not covered by tests
Expand Down

0 comments on commit 3e35f1f

Please sign in to comment.