Skip to content

Commit 778b49e

Browse files
committed
update tests
On-behalf-of: @SAP [email protected]
1 parent ea71042 commit 778b49e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

internal/sync/syncer_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
191191
Username: "Colonel Mustard",
192192
},
193193
}),
194-
existingState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
194+
existingState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
195195

196196
expectedRemoteObject: newUnstructured(&dummyv1alpha1.Thing{
197197
ObjectMeta: metav1.ObjectMeta{
@@ -217,7 +217,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
217217
Username: "Colonel Mustard",
218218
},
219219
}),
220-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
220+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
221221
},
222222

223223
/////////////////////////////////////////////////////////////////////////////////
@@ -264,7 +264,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
264264
Username: "Colonel Mustard",
265265
},
266266
}),
267-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
267+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
268268
},
269269

270270
/////////////////////////////////////////////////////////////////////////////////
@@ -321,7 +321,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
321321
Username: "Colonel Mustard",
322322
},
323323
}),
324-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
324+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
325325
},
326326

327327
/////////////////////////////////////////////////////////////////////////////////
@@ -357,7 +357,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
357357
Username: "Colonel Mustard",
358358
},
359359
}),
360-
existingState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
360+
existingState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
361361

362362
expectedRemoteObject: newUnstructured(&dummyv1alpha1.Thing{
363363
ObjectMeta: metav1.ObjectMeta{
@@ -383,7 +383,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
383383
Username: "Miss Scarlet",
384384
},
385385
}),
386-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Miss Scarlet"}}`,
386+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Miss Scarlet"}}`,
387387
},
388388

389389
/////////////////////////////////////////////////////////////////////////////////
@@ -445,7 +445,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
445445
Username: "Colonel Mustard",
446446
},
447447
}),
448-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
448+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
449449
},
450450

451451
/////////////////////////////////////////////////////////////////////////////////
@@ -574,7 +574,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
574574
Address: "Hotdogstr. 13", // we assume this field was set by a local controller/webhook, unrelated to the Sync Agent
575575
},
576576
}),
577-
existingState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
577+
existingState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
578578

579579
expectedRemoteObject: newUnstructured(&dummyv1alpha1.Thing{
580580
ObjectMeta: metav1.ObjectMeta{
@@ -602,7 +602,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
602602
Address: "Hotdogstr. 13",
603603
},
604604
}),
605-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Miss Scarlet"}}`,
605+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Miss Scarlet"}}`,
606606
},
607607

608608
/////////////////////////////////////////////////////////////////////////////////
@@ -1014,7 +1014,7 @@ func TestSyncerProcessingSingleResourceWithStatus(t *testing.T) {
10141014
CurrentVersion: "v1",
10151015
},
10161016
}),
1017-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
1017+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
10181018
},
10191019

10201020
/////////////////////////////////////////////////////////////////////////////////
@@ -1085,7 +1085,7 @@ func TestSyncerProcessingSingleResourceWithStatus(t *testing.T) {
10851085
CurrentVersion: "v1",
10861086
},
10871087
}),
1088-
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
1088+
expectedState: `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}`,
10891089
},
10901090
}
10911091

0 commit comments

Comments
 (0)