File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
internal/cmd/beta/cdn/distribution/list Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 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+
2324var testProjectId = uuid .NewString ()
2425var testClient = & cdn.APIClient {}
25- var testCtx = context .WithValue (context .Background (), "foo" , "foo" )
26+ var testCtx = context .WithValue (context .Background (), testCtxKey {} , "foo" )
2627var testNextPageID = "next-page-id-123"
27- var testTime = time .Now ()
2828var testID = "dist-1"
2929var 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" )
You can’t perform that action at this time.
0 commit comments