Skip to content

Commit

Permalink
ci(lint): enable containedctx linter
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Jan 19, 2025
1 parent caa49bc commit 7d5b749
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run:
linters:
disable-all: true
enable:
#- containedctx
- containedctx
#- contextcheck
- depguard
- errcheck
Expand Down
10 changes: 2 additions & 8 deletions core/server/session_logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func TestGetBucketConnectionInfo(t *testing.T) {
g := NewGomegaWithT(t)

type args struct {
ctx context.Context
clusterName string
ns string
cli client.Client
Expand All @@ -59,7 +58,6 @@ func TestGetBucketConnectionInfo(t *testing.T) {
{
name: "default",
args: args{
ctx: context.TODO(),
clusterName: "Default",
ns: "default",
cli: &mockGet{},
Expand All @@ -75,7 +73,6 @@ func TestGetBucketConnectionInfo(t *testing.T) {
{
name: "test",
args: args{
ctx: context.TODO(),
clusterName: "my-session/run-session",
ns: "default",
cli: &mockGet{},
Expand All @@ -91,7 +88,7 @@ func TestGetBucketConnectionInfo(t *testing.T) {
}

for _, tt := range tests {
info, err := getBucketConnectionInfo(tt.args.ctx, tt.args.clusterName, tt.args.ns, tt.args.cli)
info, err := getBucketConnectionInfo(context.TODO(), tt.args.clusterName, tt.args.ns, tt.args.cli)
g.Expect(err != nil).To(Equal(tt.wantErr))
g.Expect(info).To(Equal(tt.want))
}
Expand Down Expand Up @@ -147,7 +144,6 @@ func TestGitOpsRunLogs(t *testing.T) {
g := NewGomegaWithT(t)

type args struct {
ctx context.Context
sessionID string
nextToken string
minio s3Reader
Expand All @@ -164,7 +160,6 @@ func TestGitOpsRunLogs(t *testing.T) {
{
name: "test",
args: args{
ctx: context.TODO(),
sessionID: "test",
nextToken: "test",
minio: &mockS3Reader{},
Expand All @@ -182,7 +177,6 @@ func TestGitOpsRunLogs(t *testing.T) {
{
name: "error",
args: args{
ctx: context.TODO(),
sessionID: "error",
nextToken: "error",
minio: &mockS3Reader{},
Expand All @@ -196,7 +190,7 @@ func TestGitOpsRunLogs(t *testing.T) {

for _, tt := range tests {
got, token, err := getGitOpsRunLogs(
tt.args.ctx,
context.TODO(),
tt.args.sessionID,
tt.args.nextToken,
tt.args.minio,
Expand Down

0 comments on commit 7d5b749

Please sign in to comment.