tests: switch context.Background() -> t.Context() from go 1.24 (#3473)

This commit is contained in:
mmetc 2025-02-21 00:09:11 +01:00 committed by GitHub
parent 19eb278104
commit 45624c6fe5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 271 additions and 222 deletions

View file

@ -1,7 +1,6 @@
package apiserver
import (
"context"
"net/http"
"strings"
"testing"
@ -13,7 +12,7 @@ import (
)
func TestLPMetrics(t *testing.T) {
ctx := context.Background()
ctx := t.Context()
tests := []struct {
name string
@ -216,7 +215,7 @@ func TestLPMetrics(t *testing.T) {
}
func TestRCMetrics(t *testing.T) {
ctx := context.Background()
ctx := t.Context()
tests := []struct {
name string