update test for refresh token change
This commit is contained in:
parent
72f89818fa
commit
f46f7a39f3
|
|
@ -190,7 +190,7 @@ func (s *storedSessionLoader) refreshSessionIfNeeded(rw http.ResponseWriter, req
|
|||
if err := s.refreshSession(rw, req, session); err != nil {
|
||||
// If a preemptive refresh fails, we still keep the session
|
||||
// if validateSession succeeds.
|
||||
logger.Errorf("Unable to refresh session: %v", err)
|
||||
// PICS: We will clean the session if the refresh fails.
|
||||
return fmt.Errorf("unable to refresh session: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -295,17 +295,12 @@ var _ = Describe("Stored Session Suite", func() {
|
|||
refreshSession: defaultRefreshFunc,
|
||||
validateSession: defaultValidateFunc,
|
||||
}),
|
||||
Entry("when the provider refresh fails but validation succeeds", storedSessionLoaderTableInput{
|
||||
Entry("when the provider refresh fails", storedSessionLoaderTableInput{
|
||||
requestHeaders: http.Header{
|
||||
"Cookie": []string{"_oauth2_proxy=RefreshError"},
|
||||
},
|
||||
existingSession: nil,
|
||||
expectedSession: &sessionsapi.SessionState{
|
||||
RefreshToken: "RefreshError",
|
||||
CreatedAt: &createdPast,
|
||||
ExpiresOn: &createdFuture,
|
||||
Lock: &sessionsapi.NoOpLock{},
|
||||
},
|
||||
expectedSession: nil,
|
||||
store: defaultSessionStore,
|
||||
refreshPeriod: 1 * time.Minute,
|
||||
refreshSession: defaultRefreshFunc,
|
||||
|
|
|
|||
Loading…
Reference in New Issue