Skip to content

Commit a275995

Browse files
committed
update crds
Signed-off-by: Karol Szwaj <[email protected]>
1 parent 4b21f35 commit a275995

File tree

2 files changed

+17
-22
lines changed

2 files changed

+17
-22
lines changed

internal/sync/syncer_related_test.go

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ func TestSyncerProcessingRelatedResources(t *testing.T) {
8383
localCRD: loadCRD("things"),
8484
pubRes: newPublishedResources([]syncagentv1alpha1.RelatedResourceSpec{
8585
{
86-
Identifier: "optional-secret",
86+
Identifier: "optional-credentials",
8787
Origin: "kcp",
8888
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+
},
9496
},
9597
},
9698
},
@@ -140,11 +142,13 @@ func TestSyncerProcessingRelatedResources(t *testing.T) {
140142
Identifier: "mandatory-credentials",
141143
Origin: "kcp",
142144
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+
},
148152
},
149153
},
150154
},
@@ -240,13 +244,12 @@ func TestSyncerProcessingRelatedResources(t *testing.T) {
240244
remoteClient := buildFakeClient(testcase.remoteObject, testcase.remoteRelatedSecret)
241245

242246
syncer, err := NewResourceSyncer(
243-
// zap.Must(zap.NewDevelopment()).Sugar(),
244-
zap.NewNop().Sugar(),
247+
zap.Must(zap.NewDevelopment()).Sugar(),
248+
//zap.NewNop().Sugar(),
245249
localClient,
246250
remoteClient,
247251
testcase.pubRes,
248252
testcase.localCRD,
249-
testcase.remoteAPIGroup,
250253
nil,
251254
stateNamespace,
252255
"textor-the-doctor",

sdk/applyconfiguration/syncagent/v1alpha1/relatedresourcespec.go

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)