Skip to content

Commit d5f4304

Browse files
committed
fix(cdn) fix linting issues
1 parent f198a95 commit d5f4304

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/cmd/beta/cdn/distribution/list/list_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"net/http"
88
"net/http/httptest"
99
"testing"
10-
"time"
1110

1211
"github.com/google/go-cmp/cmp"
1312
"github.com/google/go-cmp/cmp/cmpopts"
@@ -20,11 +19,12 @@ import (
2019
"github.com/stackitcloud/stackit-sdk-go/services/cdn"
2120
)
2221

22+
type testCtxKey struct{}
23+
2324
var testProjectId = uuid.NewString()
2425
var testClient = &cdn.APIClient{}
25-
var testCtx = context.WithValue(context.Background(), "foo", "foo")
26+
var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
2627
var testNextPageID = "next-page-id-123"
27-
var testTime = time.Now()
2828
var testID = "dist-1"
2929
var testStatus = cdn.DISTRIBUTIONSTATUS_ACTIVE
3030

@@ -317,7 +317,7 @@ func TestFetchDistributions(t *testing.T) {
317317
for _, tt := range tests {
318318
t.Run(tt.description, func(t *testing.T) {
319319
callCount := 0
320-
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
320+
handler := http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
321321
resp := tt.responses[callCount]
322322
callCount++
323323
w.Header().Set("Content-Type", "application/json")

0 commit comments

Comments
 (0)