From ba74ee44266f69a06522b1354269d706ce2a6e24 Mon Sep 17 00:00:00 2001 From: Hayden Blauzvern Date: Thu, 10 Aug 2023 04:08:27 +0000 Subject: [PATCH] Fix lint Signed-off-by: Hayden Blauzvern --- pkg/pki/ssh/ssh_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/pki/ssh/ssh_test.go b/pkg/pki/ssh/ssh_test.go index c2f3bb80f..f06d1e3fd 100644 --- a/pkg/pki/ssh/ssh_test.go +++ b/pkg/pki/ssh/ssh_test.go @@ -44,6 +44,9 @@ 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) @@ -51,7 +54,7 @@ func TestIdentities(t *testing.T) { 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) {