Skip to content

Commit 33d0092

Browse files
committed
Fix test context in dex
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com> On-behalf-of: @SAP karol.szwaj@sap.com
1 parent 6037707 commit 33d0092

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/e2e/framework/dex.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func StartDex(t testing.TB) {
6868

6969
//nolint:gosec // test helper intentionally allows overriding dex binary/config via environment for local e2e runs.
7070
dexCmd := exec.CommandContext(
71-
context.Background(),
71+
t.Context(),
7272
dexBinary,
7373
"serve",
7474
dexConfig,
@@ -119,7 +119,7 @@ func CreateDexClient(t testing.TB, addr net.Addr) (string, string) {
119119
require.NoError(t, err)
120120

121121
t.Cleanup(func() {
122-
ctx, cancel := context.WithDeadline(context.Background(), metav1.Now().Add(10*time.Second))
122+
ctx, cancel := context.WithDeadline(t.Context(), metav1.Now().Add(10*time.Second))
123123
defer cancel()
124124
conn, err := grpc.NewClient("127.0.0.1:5557", grpc.WithTransportCredentials(grpcinsecure.NewCredentials()))
125125
require.NoError(t, err)

0 commit comments

Comments
 (0)