merged from gramsrv upstream
This commit is contained in:
parent
79c64ee916
commit
21a0856587
651 changed files with 54774 additions and 4590 deletions
|
|
@ -272,7 +272,8 @@ func TestServeMixedStopsAllComponentsWhenOneReturnsCleanly(t *testing.T) {
|
|||
|
||||
type countingAuthKeyStore struct {
|
||||
store.AuthKeyStore
|
||||
gets atomic.Int32
|
||||
gets atomic.Int32
|
||||
revalidates atomic.Int32
|
||||
}
|
||||
|
||||
func (s *countingAuthKeyStore) Get(ctx context.Context, id [8]byte) (store.AuthKeyData, bool, error) {
|
||||
|
|
@ -280,6 +281,11 @@ func (s *countingAuthKeyStore) Get(ctx context.Context, id [8]byte) (store.AuthK
|
|||
return s.AuthKeyStore.Get(ctx, id)
|
||||
}
|
||||
|
||||
func (s *countingAuthKeyStore) Revalidate(ctx context.Context, id [8]byte) (store.AuthKeyData, bool, error) {
|
||||
s.revalidates.Add(1)
|
||||
return s.AuthKeyStore.Revalidate(ctx, id)
|
||||
}
|
||||
|
||||
func TestUnknownAuthKeyRespondsOnceThenCloses(t *testing.T) {
|
||||
keys := &countingAuthKeyStore{AuthKeyStore: memory.NewAuthKeyStore()}
|
||||
addr, _, _ := startTestServer(t, Options{AuthKeys: keys})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue