Skip to content

Commit

Permalink
enable golangci-lint for redis module (#2126)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
  • Loading branch information
mmorel-35 authored Jan 18, 2024
1 parent 1b95b94 commit 69a475c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

- name: golangci-lint
# TODO: Remove each example/module once it passes the golangci-lint
if: ${{ inputs.platform == 'ubuntu-latest' && inputs.go-version == '1.20.x' && !contains(fromJSON('["examples/cockroachdb", "examples/toxiproxy", "modules/compose", "modules/redis"]'), inputs.project-directory) }}
if: ${{ inputs.platform == 'ubuntu-latest' && inputs.go-version == '1.20.x' && !contains(fromJSON('["examples/cockroachdb", "examples/toxiproxy", "modules/compose"]'), inputs.project-directory) }}
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
Expand Down
4 changes: 3 additions & 1 deletion modules/redis/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func assertSetsGets(t *testing.T, ctx context.Context, redisContainer *RedisCont
require.NoError(t, err)

client := redis.NewClient(options)
defer flushRedis(ctx, *client)
defer func(t *testing.T, ctx context.Context, client *redis.Client) {
require.NoError(t, flushRedis(ctx, *client))
}(t, ctx, client)

t.Log("pinging redis")
pong, err := client.Ping(ctx).Result()
Expand Down

0 comments on commit 69a475c

Please sign in to comment.