Skip to content

Commit 6f75b44

Browse files
committed
fix lint issue
Signed-off-by: Jan-Otto Kröpke <[email protected]>
1 parent 94107bb commit 6f75b44

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

core/clients/key_flow_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var (
2626
testSigningKey = []byte(`Test`)
2727
)
2828

29-
const testBearerToken = "eyJhbGciOiJub25lIn0.eyJleHAiOjIxNDc0ODM2NDd9."
29+
const testBearerToken = "eyJhbGciOiJub25lIn0.eyJleHAiOjIxNDc0ODM2NDd9." //nolint:gosec // linter false positive
3030

3131
func fixtureServiceAccountKey(mods ...func(*ServiceAccountKeyResponse)) *ServiceAccountKeyResponse {
3232
validUntil := time.Now().Add(time.Hour)
@@ -345,7 +345,7 @@ func TestKeyFlow_Do(t *testing.T) {
345345
name: "success with code 500",
346346
keyFlow: &KeyFlow{rt: http.DefaultTransport, config: &KeyFlowConfig{}},
347347
handlerFn: func(_ testing.TB) http.HandlerFunc {
348-
return func(w http.ResponseWriter, r *http.Request) {
348+
return func(w http.ResponseWriter, _ *http.Request) {
349349
w.Header().Set("Content-Type", "text/html")
350350
w.WriteHeader(http.StatusInternalServerError)
351351
_, _ = fmt.Fprintln(w, `<html>Internal Server Error</html>`)
@@ -405,7 +405,6 @@ func TestKeyFlow_Do(t *testing.T) {
405405
}
406406
for _, tt := range tests {
407407
t.Run(tt.name, func(t *testing.T) {
408-
409408
ctx := context.Background()
410409
ctx, cancel := context.WithCancel(ctx)
411410
t.Cleanup(cancel) // This cancels the refresher goroutine

core/clients/token_flow_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func TestTokenFlow_Do(t *testing.T) {
9090
ServiceAccountToken: "efg",
9191
}},
9292
handlerFn: func(testing.TB) http.HandlerFunc {
93-
return func(w http.ResponseWriter, r *http.Request) {
93+
return func(w http.ResponseWriter, _ *http.Request) {
9494
w.Header().Set("Content-Type", "text/html")
9595
w.WriteHeader(http.StatusInternalServerError)
9696
_, _ = fmt.Fprintln(w, `<html>Internal Server Error</html>`)
@@ -146,7 +146,7 @@ func TestTokenFlow_Do(t *testing.T) {
146146
},
147147
},
148148
handlerFn: func(testing.TB) http.HandlerFunc {
149-
return func(w http.ResponseWriter, r *http.Request) {
149+
return func(w http.ResponseWriter, _ *http.Request) {
150150
w.Header().Set("Content-Type", "application/json")
151151
w.WriteHeader(http.StatusOK)
152152
_, _ = fmt.Fprintln(w, `{"status":"ok"}`)

0 commit comments

Comments
 (0)