Skip to content

Commit

Permalink
feat: add coverage for the case we do not have any authenticator
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Nov 30, 2023
1 parent 8b306a4 commit e07b943
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions internal/authenticator/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ import (
"go.uber.org/zap"
)

func TestBuilderWithoutAuthenticator(t *testing.T) {
t.Parallel()

require := require.New(t)

b := authenticator.Builder{
Vendors: []config.Vendor{},
Logger: zap.NewNop(),
ValidatorConfig: config.Validator{
URL: "",
Timeout: 0,
},
}

_, err := b.Authenticators()
require.ErrorIs(err, authenticator.ErrNoAuthenticator)
}

func TestBuilderInternalAuthenticator(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit e07b943

Please sign in to comment.