mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-02-03 13:21:51 +02:00
3fa42edb73
* fix import path for v7 find ./ -name "*.go" | xargs sed -i -e 's|"github.com/oauth2-proxy/oauth2-proxy|"github.com/oauth2-proxy/oauth2-proxy/v7|' * fix module path * go mod tidy * fix installation docs * update CHANGELOG * Update CHANGELOG.md Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk> Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
26 lines
647 B
Go
26 lines
647 B
Go
package persistence
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
|
|
sessionsapi "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/sessions"
|
|
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/sessions/tests"
|
|
. "github.com/onsi/ginkgo"
|
|
)
|
|
|
|
var _ = Describe("Persistence Manager Tests", func() {
|
|
var ms *tests.MockStore
|
|
BeforeEach(func() {
|
|
ms = tests.NewMockStore()
|
|
})
|
|
tests.RunSessionStoreTests(
|
|
func(_ *options.SessionOptions, cookieOpts *options.Cookie) (sessionsapi.SessionStore, error) {
|
|
return NewManager(ms, cookieOpts), nil
|
|
},
|
|
func(d time.Duration) error {
|
|
ms.FastForward(d)
|
|
return nil
|
|
})
|
|
})
|