@@ -105,7 +105,6 @@ func SetRequestsUndo(ctx gobdd.Context, value map[string]map[string]UndoAction)
105105}
106106
107107type clientKeys struct {}
108- type authenticatedContext struct {}
109108type ctxRequestsUndoKey struct {}
110109
111110func ConfigureClients (ctx gobdd.Context , cctx context.Context ) (context.Context , func ()) {
@@ -137,16 +136,6 @@ func ConfigureClients(ctx gobdd.Context, cctx context.Context) (context.Context,
137136 c1 .GetConfig ().HTTPClient = & httpClient
138137 c2 .GetConfig ().HTTPClient = & httpClient
139138
140- ctx .Set (
141- authenticatedContext {},
142- testsV1 .WithTestAuth (
143- testsV2 .WithTestAuth (
144- testsV1 .NewDefaultContext (
145- testsV2 .NewDefaultContext (cctx ),
146- ),
147- ),
148- ),
149- )
150139 clients := map [string ]reflect.Value {
151140 "v1" : reflect .ValueOf (c1 ),
152141 "v2" : reflect .ValueOf (c2 ),
@@ -158,11 +147,13 @@ func ConfigureClients(ctx gobdd.Context, cctx context.Context) (context.Context,
158147}
159148
160149func getAuthenticatedContext (ctx gobdd.Context ) context.Context {
161- authenticatedContext , err := ctx .Get (authenticatedContext {})
162- if err != nil {
163- GetT (ctx ).Fatalf ("can't get authenticated context: %v" , err )
164- }
165- return authenticatedContext .(context.Context )
150+ return testsV1 .WithTestAuth (
151+ testsV2 .WithTestAuth (
152+ testsV1 .NewDefaultContext (
153+ testsV2 .NewDefaultContext (GetCtx (ctx )),
154+ ),
155+ ),
156+ )
166157}
167158
168159func GetClientVersion (ctx gobdd.Context , version string ) (reflect.Value , error ) {
0 commit comments