Skip to content

Commit 8556e33

Browse files
committed
Unit tests pass
Signed-off-by: Erik Godding Boye <[email protected]>
1 parent a6a89a1 commit 8556e33

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

pkg/bundle/bundle_test.go

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,24 @@ func Test_Reconcile(t *testing.T) {
151151
}
152152

153153
pkcs12DefaultKeyValue = trustmanagerapi.KeyValueTarget{
154-
Data: []trustmanagerapi.TargetKeyValue{{
155-
Key: "target.p12",
156-
Format: trustmanagerapi.BundleFormatPKCS12,
157-
PKCS12: trustmanagerapi.PKCS12{Password: ptr.To(trustmanagerapi.DefaultPKCS12Password)},
158-
}},
154+
Data: []trustmanagerapi.TargetKeyValue{
155+
{Key: targetKey},
156+
{
157+
Key: "target.p12",
158+
Format: trustmanagerapi.BundleFormatPKCS12,
159+
PKCS12: trustmanagerapi.PKCS12{Password: ptr.To(trustmanagerapi.DefaultPKCS12Password)},
160+
},
161+
},
159162
}
160163
pkcs12DefaultKeyValueOldPassword = trustmanagerapi.KeyValueTarget{
161-
Data: []trustmanagerapi.TargetKeyValue{{
162-
Key: "target.p12",
163-
Format: trustmanagerapi.BundleFormatPKCS12,
164-
PKCS12: trustmanagerapi.PKCS12{Password: ptr.To("OLD PASSWORD")},
165-
}},
164+
Data: []trustmanagerapi.TargetKeyValue{
165+
{Key: targetKey},
166+
{
167+
Key: "target.p12",
168+
Format: trustmanagerapi.BundleFormatPKCS12,
169+
PKCS12: trustmanagerapi.PKCS12{Password: ptr.To("OLD PASSWORD")},
170+
},
171+
},
166172
}
167173

168174
configMapPatch = func(name, namespace string, data map[string]string, binData map[string][]byte, key *string, keyValue *trustmanagerapi.KeyValueTarget) *coreapplyconfig.ConfigMapApplyConfiguration {
@@ -659,7 +665,7 @@ func Test_Reconcile(t *testing.T) {
659665
),
660666
},
661667
expError: false,
662-
expPatches: []interface{}{},
668+
expPatches: nil,
663669
expBundlePatch: &trustmanagerapi.BundleStatus{
664670
Conditions: []metav1.Condition{
665671
{
@@ -1401,7 +1407,7 @@ func Test_Reconcile(t *testing.T) {
14011407
)},
14021408
configureDefaultPackage: true,
14031409
expError: false,
1404-
expPatches: []interface{}{},
1410+
expPatches: nil,
14051411
expBundlePatch: &trustmanagerapi.BundleStatus{
14061412
Conditions: []metav1.Condition{
14071413
{

0 commit comments

Comments
 (0)