@@ -147,7 +147,7 @@ func (info handlerTestInfo) postHandlers(t *testing.T) pathHandlers {
147
147
}
148
148
149
149
func TestPostHandlersRejectGet (t * testing.T ) {
150
- info := setupTest (t , []string {testdata .FakeCACertPEM }, nil )
150
+ info := setupTest (t , []string {testdata .CACertPEM }, nil )
151
151
defer info .mockCtrl .Finish ()
152
152
153
153
// Anything in the post handler list should reject GET
@@ -168,7 +168,7 @@ func TestPostHandlersRejectGet(t *testing.T) {
168
168
}
169
169
170
170
func TestGetHandlersRejectPost (t * testing.T ) {
171
- info := setupTest (t , []string {testdata .FakeCACertPEM }, nil )
171
+ info := setupTest (t , []string {testdata .CACertPEM }, nil )
172
172
defer info .mockCtrl .Finish ()
173
173
174
174
// Anything in the get handler list should reject POST.
@@ -201,7 +201,7 @@ func TestPostHandlersFailure(t *testing.T) {
201
201
{"wrong-chain" , strings .NewReader (`{ "chain": [ "test" ] }` ), http .StatusBadRequest },
202
202
}
203
203
204
- info := setupTest (t , []string {testdata .FakeCACertPEM }, nil )
204
+ info := setupTest (t , []string {testdata .CACertPEM }, nil )
205
205
defer info .mockCtrl .Finish ()
206
206
for path , handler := range info .postHandlers (t ) {
207
207
t .Run (path , func (t * testing.T ) {
@@ -366,30 +366,30 @@ func TestAddChain(t *testing.T) {
366
366
}{
367
367
{
368
368
descr : "leaf-only" ,
369
- chain : []string {testdata .LeafSignedByFakeIntermediateCertPEM },
369
+ chain : []string {testdata .CertFromIntermediate },
370
370
want : http .StatusBadRequest ,
371
371
},
372
372
{
373
373
descr : "wrong-entry-type" ,
374
- chain : []string {testdata .PrecertPEMValid },
374
+ chain : []string {testdata .PreCertFromIntermediate },
375
375
want : http .StatusBadRequest ,
376
376
},
377
377
{
378
378
descr : "backend-storage-fail" ,
379
- chain : []string {testdata .LeafSignedByFakeIntermediateCertPEM , testdata .FakeIntermediateCertPEM },
379
+ chain : []string {testdata .CertFromIntermediate , testdata .IntermediateFromRoot },
380
380
toSign : "1337d72a403b6539f58896decba416d5d4b3603bfa03e1f94bb9b4e898af897d" ,
381
381
want : http .StatusInternalServerError ,
382
382
err : status .Errorf (codes .Internal , "error" ),
383
383
},
384
384
{
385
385
descr : "success-without-root" ,
386
- chain : []string {testdata .LeafSignedByFakeIntermediateCertPEM , testdata .FakeIntermediateCertPEM },
386
+ chain : []string {testdata .CertFromIntermediate , testdata .IntermediateFromRoot },
387
387
toSign : "1337d72a403b6539f58896decba416d5d4b3603bfa03e1f94bb9b4e898af897d" ,
388
388
want : http .StatusOK ,
389
389
},
390
390
{
391
391
descr : "success" ,
392
- chain : []string {testdata .LeafSignedByFakeIntermediateCertPEM , testdata .FakeIntermediateCertPEM , testdata .FakeCACertPEM },
392
+ chain : []string {testdata .CertFromIntermediate , testdata .IntermediateFromRoot , testdata .CACertPEM },
393
393
toSign : "1337d72a403b6539f58896decba416d5d4b3603bfa03e1f94bb9b4e898af897d" ,
394
394
want : http .StatusOK ,
395
395
},
@@ -400,7 +400,7 @@ func TestAddChain(t *testing.T) {
400
400
t .Fatalf ("Failed to create test signer: %v" , err )
401
401
}
402
402
403
- info := setupTest (t , []string {testdata .FakeCACertPEM }, signer )
403
+ info := setupTest (t , []string {testdata .CACertPEM }, signer )
404
404
defer info .mockCtrl .Finish ()
405
405
406
406
for _ , test := range tests {
0 commit comments