From c721c5a6cdc1392ff39a413b805be4f1f7b6ee84 Mon Sep 17 00:00:00 2001 From: akhilkumarpilli Date: Tue, 3 Dec 2024 16:02:51 +0530 Subject: [PATCH] address comment --- tests/integration/v2/services.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/v2/services.go b/tests/integration/v2/services.go index 29c02819f52..241a07cdd82 100644 --- a/tests/integration/v2/services.go +++ b/tests/integration/v2/services.go @@ -76,10 +76,11 @@ type integrationContext struct { func SetHeaderInfo(ctx context.Context, h header.Info) context.Context { iCtx, ok := ctx.Value(contextKey).(*integrationContext) - if ok { - iCtx.header = h + if !ok { + return ctx } - return ctx + iCtx.header = h + return context.WithValue(ctx, contextKey, iCtx) } func HeaderInfoFromContext(ctx context.Context) header.Info {