@@ -161,7 +161,7 @@ func NewHTTPClientWithArbitrarySessionTokenAndTraits(t *testing.T, ctx context.C
161
161
162
162
func NewHTTPClientWithArbitrarySessionCookie (t * testing.T , ctx context.Context , reg * driver.RegistryDefault ) * http.Client {
163
163
req := NewTestHTTPRequest (t , "GET" , "/sessions/whoami" , nil )
164
- req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
164
+ req = req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
165
165
id := x .NewUUID ()
166
166
s , err := NewActiveSession (req , reg ,
167
167
& identity.Identity {ID : id , State : identity .StateActive , Traits : []byte ("{}" ), Credentials : map [identity.CredentialsType ]identity.Credentials {
@@ -178,7 +178,7 @@ func NewHTTPClientWithArbitrarySessionCookie(t *testing.T, ctx context.Context,
178
178
179
179
func NewNoRedirectHTTPClientWithArbitrarySessionCookie (t * testing.T , ctx context.Context , reg * driver.RegistryDefault ) * http.Client {
180
180
req := NewTestHTTPRequest (t , "GET" , "/sessions/whoami" , nil )
181
- req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
181
+ req = req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
182
182
id := x .NewUUID ()
183
183
s , err := NewActiveSession (req , reg ,
184
184
& identity.Identity {ID : id , State : identity .StateActive ,
@@ -196,7 +196,7 @@ func NewNoRedirectHTTPClientWithArbitrarySessionCookie(t *testing.T, ctx context
196
196
197
197
func NewHTTPClientWithIdentitySessionCookie (t * testing.T , ctx context.Context , reg * driver.RegistryDefault , id * identity.Identity ) * http.Client {
198
198
req := NewTestHTTPRequest (t , "GET" , "/sessions/whoami" , nil )
199
- req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
199
+ req = req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
200
200
s , err := NewActiveSession (req , reg ,
201
201
id ,
202
202
time .Now (),
@@ -223,7 +223,7 @@ func NewHTTPClientWithIdentitySessionCookieLocalhost(t *testing.T, ctx context.C
223
223
224
224
func NewHTTPClientWithIdentitySessionToken (t * testing.T , ctx context.Context , reg * driver.RegistryDefault , id * identity.Identity ) * http.Client {
225
225
req := NewTestHTTPRequest (t , "GET" , "/sessions/whoami" , nil )
226
- req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
226
+ req = req .WithContext (confighelpers .WithConfigValue (ctx , "session.lifespan" , time .Hour ))
227
227
s , err := NewActiveSession (req , reg ,
228
228
id ,
229
229
time .Now (),
0 commit comments