mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
tests: switch context.Background() -> t.Context() from go 1.24 (#3473)
This commit is contained in:
parent
19eb278104
commit
45624c6fe5
37 changed files with 271 additions and 222 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue