Make assertions about how many secrets were stored by fosite in tests

In both callback_handler_test.go and token_handler_test.go

Signed-off-by: Aram Price <pricear@vmware.com>
This commit is contained in:
Ryan Richard
2020-12-04 15:40:17 -08:00
committed by Aram Price
parent 26a8747509
commit 858356610c
9 changed files with 84 additions and 46 deletions
@@ -20,6 +20,8 @@ import (
)
const (
TypeLabelValue = "authcode"
ErrInvalidAuthorizeRequestData = constable.Error("authorization request data must be present")
ErrInvalidAuthorizeRequestVersion = constable.Error("authorization request data has wrong version")
@@ -39,7 +41,7 @@ type AuthorizeCodeSession struct {
}
func New(secrets corev1client.SecretInterface) oauth2.AuthorizeCodeStorage {
return &authorizeCodeStorage{storage: crud.New("authcode", secrets)}
return &authorizeCodeStorage{storage: crud.New(TypeLabelValue, secrets)}
}
func (a *authorizeCodeStorage) CreateAuthorizeCodeSession(ctx context.Context, signature string, requester fosite.Requester) error {