From 51cc4c07b2a2b6345b1496baac865f5faf955e7d Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Fri, 20 Jan 2017 00:52:56 +0000 Subject: Switch from database/sql to sqlx --- server/store/store_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/store/store_test.go') diff --git a/server/store/store_test.go b/server/store/store_test.go index afe6c03..4196c37 100644 --- a/server/store/store_test.go +++ b/server/store/store_test.go @@ -11,6 +11,7 @@ import ( "testing" "time" + "github.com/nsheridan/cashier/server/store/types" "github.com/nsheridan/cashier/testdata" "github.com/stretchr/testify/assert" @@ -25,7 +26,7 @@ func TestParseCertificate(t *testing.T) { pub, _ := ssh.NewPublicKey(r.Public()) c := &ssh.Certificate{ KeyId: "id", - ValidPrincipals: []string{"principal"}, + ValidPrincipals: types.StringSlice{"principal"}, ValidBefore: now, CertType: ssh.UserCert, Key: pub, @@ -35,7 +36,7 @@ func TestParseCertificate(t *testing.T) { rec := parseCertificate(c) a.Equal(c.KeyId, rec.KeyID) - a.Equal(c.ValidPrincipals, rec.Principals) + a.Equal(c.ValidPrincipals, []string(rec.Principals)) a.Equal(c.ValidBefore, uint64(rec.Expires.Unix())) a.Equal(c.ValidAfter, uint64(rec.CreatedAt.Unix())) } -- cgit v1.2.3