Skip to content

Commit

Permalink
feat: add test for key parsing and reading
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Dec 4, 2023
1 parent 4d0b4d8 commit 115f42a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/authenticator/key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/stretchr/testify/require"
)

// nolint: funlen
func TestGenerateKeys(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -37,6 +38,15 @@ func TestGenerateKeys(t *testing.T) {
haveErr: true,
err: nil,
},
{
name: "rsa method with invalid key",
method: "RSA512",
keys: map[string]string{
"snpay": "YWRtaW4",
},
haveErr: true,
err: nil,
},
{
name: "invalid key type",
method: "Parham",
Expand Down

0 comments on commit 115f42a

Please sign in to comment.