Skip to content

Commit 58f04e8

Browse files
committed
Improve diff/formatting
Signed-off-by: Erik Godding Boye <[email protected]>
1 parent 43543b9 commit 58f04e8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

pkg/bundle/internal/target/target_test.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,16 @@ func Test_ApplyTarget_ConfigMap(t *testing.T) {
466466
},
467467
}
468468

469+
certPool := util.NewCertPool()
470+
err := certPool.AddCertsFromPEM([]byte(data))
471+
assert.NoError(t, err)
472+
469473
spec := trustapi.BundleSpec{
470474
Target: trustapi.BundleTarget{
471475
ConfigMap: &trustapi.TargetTemplate{Key: key},
472476
AdditionalFormats: &trustapi.AdditionalFormats{},
473477
},
474478
}
475-
certPool := util.NewCertPool()
476-
err := certPool.AddCertsFromPEM([]byte(data))
477-
assert.NoError(t, err)
478479
resolvedBundle := source.BundleData{CertPool: certPool}
479480
if tt.withJKS {
480481
spec.Target.AdditionalFormats.JKS = &trustapi.JKS{
@@ -916,16 +917,16 @@ func Test_ApplyTarget_Secret(t *testing.T) {
916917
},
917918
}
918919

920+
certPool := util.NewCertPool()
921+
err := certPool.AddCertsFromPEM([]byte(data))
922+
assert.NoError(t, err)
923+
919924
spec := trustapi.BundleSpec{
920925
Target: trustapi.BundleTarget{
921926
Secret: &trustapi.TargetTemplate{Key: key},
922927
AdditionalFormats: &trustapi.AdditionalFormats{},
923928
},
924929
}
925-
certPool := util.NewCertPool()
926-
err := certPool.AddCertsFromPEM([]byte(data))
927-
assert.NoError(t, err)
928-
929930
resolvedBundle := source.BundleData{CertPool: certPool}
930931
if tt.withJKS {
931932
spec.Target.AdditionalFormats.JKS = &trustapi.JKS{

0 commit comments

Comments
 (0)