@@ -83,14 +83,16 @@ func TestSyncerProcessingRelatedResources(t *testing.T) {
83
83
localCRD : loadCRD ("things" ),
84
84
pubRes : newPublishedResources ([]syncagentv1alpha1.RelatedResourceSpec {
85
85
{
86
- Identifier : "optional-secret " ,
86
+ Identifier : "optional-credentials " ,
87
87
Origin : "kcp" ,
88
88
Kind : "Secret" ,
89
- Reference : syncagentv1alpha1.RelatedResourceReference {
90
- Name : syncagentv1alpha1.ResourceLocator {
91
- Path : "metadata.name" ,
92
- Regex : & syncagentv1alpha1.RegexResourceLocator {
93
- Replacement : "optional-credentials" ,
89
+ Object : syncagentv1alpha1.RelatedResourceObject {
90
+ RelatedResourceObjectSpec : syncagentv1alpha1.RelatedResourceObjectSpec {
91
+ Reference : & syncagentv1alpha1.RelatedResourceObjectReference {
92
+ Path : "metadata.name" ,
93
+ Regex : & syncagentv1alpha1.RegularExpression {
94
+ Replacement : "optional-credentials" ,
95
+ },
94
96
},
95
97
},
96
98
},
@@ -140,11 +142,13 @@ func TestSyncerProcessingRelatedResources(t *testing.T) {
140
142
Identifier : "mandatory-credentials" ,
141
143
Origin : "kcp" ,
142
144
Kind : "Secret" ,
143
- Reference : syncagentv1alpha1.RelatedResourceReference {
144
- Name : syncagentv1alpha1.ResourceLocator {
145
- Path : "metadata.name" ,
146
- Regex : & syncagentv1alpha1.RegexResourceLocator {
147
- Replacement : "mandatory-credentials" ,
145
+ Object : syncagentv1alpha1.RelatedResourceObject {
146
+ RelatedResourceObjectSpec : syncagentv1alpha1.RelatedResourceObjectSpec {
147
+ Reference : & syncagentv1alpha1.RelatedResourceObjectReference {
148
+ Path : "metadata.name" ,
149
+ Regex : & syncagentv1alpha1.RegularExpression {
150
+ Replacement : "mandatory-credentials" ,
151
+ },
148
152
},
149
153
},
150
154
},
@@ -240,13 +244,12 @@ func TestSyncerProcessingRelatedResources(t *testing.T) {
240
244
remoteClient := buildFakeClient (testcase .remoteObject , testcase .remoteRelatedSecret )
241
245
242
246
syncer , err := NewResourceSyncer (
243
- // zap.Must(zap.NewDevelopment()).Sugar(),
244
- zap .NewNop ().Sugar (),
247
+ zap .Must (zap .NewDevelopment ()).Sugar (),
248
+ // zap.NewNop().Sugar(),
245
249
localClient ,
246
250
remoteClient ,
247
251
testcase .pubRes ,
248
252
testcase .localCRD ,
249
- testcase .remoteAPIGroup ,
250
253
nil ,
251
254
stateNamespace ,
252
255
"textor-the-doctor" ,
0 commit comments