aboutsummaryrefslogtreecommitdiff
path: root/server/store/store_test.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-01-20 00:52:56 +0000
committerNiall Sheridan <nsheridan@gmail.com>2017-01-22 22:25:35 +0000
commit51cc4c07b2a2b6345b1496baac865f5faf955e7d (patch)
treeedd51d045954eb802c470be4481a1d130d5f988c /server/store/store_test.go
parentfb4a1232be3b2d00483a7399e7131c211d8cd551 (diff)
Switch from database/sql to sqlx
Diffstat (limited to 'server/store/store_test.go')
-rw-r--r--server/store/store_test.go5
1 files changed, 3 insertions, 2 deletions
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()))
}