Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Hayden Blauzvern <[email protected]>
  • Loading branch information
haydentherapper committed Aug 14, 2023
1 parent 4c09f46 commit ce741f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/pki/ssh/ssh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,17 @@ func TestIdentities(t *testing.T) {

keyVal := expectedKey.(ssh.CryptoPublicKey).CryptoPublicKey()
pkixKey, err := cryptoutils.MarshalPublicKeyToDER(keyVal)
if err != nil {
t.Fatal(err)
}
ids, err := pub.Identities()
if err != nil {
t.Fatal(err)
}
if len(ids) != 1 {
t.Errorf("too many identities, expected 1, got %v", len(ids))
}
if !reflect.DeepEqual(ids[0].Crypto.(ssh.PublicKey).Marshal(), expectedKey.(ssh.PublicKey).Marshal()) {
if !reflect.DeepEqual(ids[0].Crypto.(ssh.PublicKey).Marshal(), expectedKey.Marshal()) {
t.Errorf("certificates did not match")
}
if !reflect.DeepEqual(ids[0].Raw, pkixKey) {
Expand Down

0 comments on commit ce741f1

Please sign in to comment.