@@ -20,18 +20,19 @@ import (
2020 "testing"
2121 "time"
2222
23+ // Register PEMKeyFile ProtoHandler
24+ _ "github.com/google/trillian/crypto/keys/pem/proto"
25+
2326 "github.com/golang/protobuf/ptypes"
2427 "github.com/golang/protobuf/ptypes/timestamp"
2528 ct "github.com/google/certificate-transparency-go"
2629 "github.com/google/certificate-transparency-go/trillian/ctfe/configpb"
27- "github.com/google/trillian/crypto/keys"
2830 "github.com/google/trillian/crypto/keyspb"
2931 "github.com/google/trillian/monitoring"
3032)
3133
3234func TestSetUpInstance (t * testing.T ) {
3335 ctx := context .Background ()
34- sf := & keys.DefaultSignerFactory {}
3536
3637 privKey , err := ptypes .MarshalAny (& keyspb.PEMKeyFile {Path : "../testdata/ct-http-server.privkey.pem" , Password : "dirk" })
3738 if err != nil {
@@ -155,8 +156,7 @@ func TestSetUpInstance(t *testing.T) {
155156 }
156157
157158 for _ , test := range tests {
158- _ , err := SetUpInstance (ctx , nil , & test .cfg , sf , time .Second , monitoring.InertMetricFactory {})
159- if err != nil {
159+ if _ , err := SetUpInstance (ctx , nil , & test .cfg , time .Second , monitoring.InertMetricFactory {}); err != nil {
160160 if test .errStr == "" {
161161 t .Errorf ("(%v).SetUpInstance()=_,%v; want _,nil" , test .desc , err )
162162 } else if ! strings .Contains (err .Error (), test .errStr ) {
0 commit comments