aboutsummaryrefslogtreecommitdiff
path: root/server/signer
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-08-20 21:04:05 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-08-20 21:04:05 +0100
commitdb8b52608b18301b11b54fdfd0363b5e77fa6567 (patch)
tree585f60b14bbf0f18ea9b90639af7d4939067aa3f /server/signer
parent7e29b8a770a45b68638f5dba9ad58b755ccb4749 (diff)
Replace Fatals with Errors
Diffstat (limited to 'server/signer')
-rw-r--r--server/signer/signer_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/signer/signer_test.go b/server/signer/signer_test.go
index 5fbf2c6..805f0fc 100644
--- a/server/signer/signer_test.go
+++ b/server/signer/signer_test.go
@@ -32,24 +32,24 @@ func TestCert(t *testing.T) {
}
cert, err := signer.SignUserKey(r)
if err != nil {
- t.Fatal(err)
+ t.Error(err)
}
if !bytes.Equal(cert.SignatureKey.Marshal(), signer.ca.PublicKey().Marshal()) {
- t.Fatal("Cert signer and server signer don't match")
+ t.Error("Cert signer and server signer don't match")
}
var principals []string
principals = append(principals, r.Principal)
principals = append(principals, signer.principals...)
if !reflect.DeepEqual(cert.ValidPrincipals, principals) {
- t.Fatalf("Expected %s, got %s", cert.ValidPrincipals, principals)
+ t.Errorf("Expected %s, got %s", cert.ValidPrincipals, principals)
}
k1, _, _, _, err := ssh.ParseAuthorizedKey([]byte(r.Key))
k2 := cert.Key
if !bytes.Equal(k1.Marshal(), k2.Marshal()) {
- t.Fatal("Cert key doesn't match public key")
+ t.Error("Cert key doesn't match public key")
}
if cert.ValidBefore != uint64(r.ValidUntil.Unix()) {
- t.Fatalf("Invalid validity, expected %d, got %d", r.ValidUntil, cert.ValidBefore)
+ t.Errorf("Invalid validity, expected %d, got %d", r.ValidUntil, cert.ValidBefore)
}
}