@@ -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