Documentation
¶
Overview ¶
Package storetest is a conformance suite for SystemAuth social login stores. Every LoginSessionStore, oauthclient.StateStore, ConsentStore and VerificationTokenStore implementation should pass it:
func TestMyStore(t *testing.T) {
storetest.LoginSessionStore(t, func(t *testing.T) systemauth.LoginSessionStore {
return newMyStore(t)
})
}
Index ¶
- Constants
- func ConsentStore(t *testing.T, newStore func(t *testing.T) systemauth.ConsentStore)
- func LoginSessionStore(t *testing.T, newStore func(t *testing.T) systemauth.LoginSessionStore)
- func StateStore(t *testing.T, newStore func(t *testing.T) oauthclient.StateStore)
- func VerificationTokenStore(t *testing.T, newStore func(t *testing.T) systemauth.VerificationTokenStore)
Constants ¶
const Concurrency = 16
Concurrency is how many goroutines race in the single-use tests.
Variables ¶
This section is empty.
Functions ¶
func ConsentStore ¶
func ConsentStore(t *testing.T, newStore func(t *testing.T) systemauth.ConsentStore)
ConsentStore runs the conformance suite against stores created by newStore.
func LoginSessionStore ¶
func LoginSessionStore(t *testing.T, newStore func(t *testing.T) systemauth.LoginSessionStore)
LoginSessionStore runs the conformance suite against stores created by newStore. Each subtest gets a fresh store.
func StateStore ¶
func StateStore(t *testing.T, newStore func(t *testing.T) oauthclient.StateStore)
StateStore runs the conformance suite for oauthclient.StateStore implementations used as SystemAuth login state stores.
func VerificationTokenStore ¶
func VerificationTokenStore(t *testing.T, newStore func(t *testing.T) systemauth.VerificationTokenStore)
VerificationTokenStore runs the conformance suite against stores created by newStore. Each subtest gets a fresh store.
Types ¶
This section is empty.