@@ -193,7 +193,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
193
193
Username : "Colonel Mustard" ,
194
194
},
195
195
}),
196
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
196
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
197
197
198
198
expectedRemoteObject : newUnstructured (& dummyv1alpha1.Thing {
199
199
ObjectMeta : metav1.ObjectMeta {
@@ -222,7 +222,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
222
222
Username : "Colonel Mustard" ,
223
223
},
224
224
}),
225
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
225
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
226
226
},
227
227
228
228
/////////////////////////////////////////////////////////////////////////////////
@@ -271,7 +271,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
271
271
Username : "Colonel Mustard" ,
272
272
},
273
273
}),
274
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
274
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
275
275
},
276
276
277
277
/////////////////////////////////////////////////////////////////////////////////
@@ -330,7 +330,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
330
330
Username : "Colonel Mustard" ,
331
331
},
332
332
}),
333
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
333
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
334
334
},
335
335
336
336
/////////////////////////////////////////////////////////////////////////////////
@@ -368,7 +368,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
368
368
Username : "Colonel Mustard" ,
369
369
},
370
370
}),
371
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
371
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
372
372
373
373
expectedRemoteObject : newUnstructured (& dummyv1alpha1.Thing {
374
374
ObjectMeta : metav1.ObjectMeta {
@@ -397,7 +397,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
397
397
Username : "Miss Scarlet" ,
398
398
},
399
399
}),
400
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Miss Scarlet"}}` ,
400
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Miss Scarlet"}}` ,
401
401
},
402
402
403
403
/////////////////////////////////////////////////////////////////////////////////
@@ -464,7 +464,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
464
464
Username : "Colonel Mustard" ,
465
465
},
466
466
}),
467
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
467
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
468
468
},
469
469
470
470
/////////////////////////////////////////////////////////////////////////////////
@@ -513,7 +513,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
513
513
Username : "Colonel Mustard" ,
514
514
},
515
515
}),
516
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{"existing-annotation":"annotation-value"},"labels":{"existing-label":"label-value"},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
516
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{"existing-annotation":"annotation-value"},"labels":{"existing-label":"label-value"},"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
517
517
518
518
expectedRemoteObject : newUnstructured (& dummyv1alpha1.Thing {
519
519
ObjectMeta : metav1.ObjectMeta {
@@ -557,7 +557,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
557
557
},
558
558
}),
559
559
// last state annotation is "space optimized" and so does not include the ignored labels and annotations
560
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{"existing-annotation":"new-annotation-value","new-annotation":"hei-verden"},"labels":{"existing-label":"new-label-value","new-label":"hello-world"},"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
560
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"annotations":{"existing-annotation":"new-annotation-value","new-annotation":"hei-verden"},"labels":{"existing-label":"new-label-value","new-label":"hello-world"},"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
561
561
},
562
562
563
563
/////////////////////////////////////////////////////////////////////////////////
@@ -592,7 +592,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
592
592
Username : "Colonel Mustard" ,
593
593
},
594
594
}),
595
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
595
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
596
596
597
597
expectedRemoteObject : newUnstructured (& dummyv1alpha1.Thing {
598
598
ObjectMeta : metav1.ObjectMeta {
@@ -622,7 +622,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
622
622
},
623
623
}),
624
624
// last state annotation is "space optimized" and so does not include the ignored labels and annotations
625
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
625
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
626
626
},
627
627
628
628
/////////////////////////////////////////////////////////////////////////////////
@@ -661,7 +661,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
661
661
Address : "Hotdogstr. 13" , // we assume this field was set by a local controller/webhook, unrelated to the Sync Agent
662
662
},
663
663
}),
664
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
664
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
665
665
666
666
expectedRemoteObject : newUnstructured (& dummyv1alpha1.Thing {
667
667
ObjectMeta : metav1.ObjectMeta {
@@ -692,7 +692,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
692
692
Address : "Hotdogstr. 13" ,
693
693
},
694
694
}),
695
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Miss Scarlet"}}` ,
695
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Miss Scarlet"}}` ,
696
696
},
697
697
698
698
/////////////////////////////////////////////////////////////////////////////////
@@ -737,7 +737,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
737
737
Username : "Colonel Mustard" ,
738
738
},
739
739
}),
740
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
740
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
741
741
742
742
expectedRemoteObject : newUnstructured (& dummyv1alpha1.Thing {
743
743
ObjectMeta : metav1.ObjectMeta {
@@ -771,7 +771,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
771
771
Username : "Colonel Mustard" ,
772
772
},
773
773
}),
774
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
774
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
775
775
},
776
776
777
777
/////////////////////////////////////////////////////////////////////////////////
@@ -850,7 +850,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
850
850
Username : "Colonel Mustard" ,
851
851
},
852
852
}),
853
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
853
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
854
854
855
855
expectedRemoteObject : newUnstructured (& dummyv1alpha1.Thing {
856
856
ObjectMeta : metav1.ObjectMeta {
@@ -881,7 +881,7 @@ func TestSyncerProcessingSingleResourceWithoutStatus(t *testing.T) {
881
881
Username : "Colonel Mustard" ,
882
882
},
883
883
}),
884
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
884
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
885
885
},
886
886
}
887
887
@@ -1076,7 +1076,7 @@ func TestSyncerProcessingSingleResourceWithStatus(t *testing.T) {
1076
1076
CurrentVersion : "v1" ,
1077
1077
},
1078
1078
}),
1079
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
1079
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
1080
1080
1081
1081
expectedRemoteObject : newUnstructured (& dummyv1alpha1.ThingWithStatusSubresource {
1082
1082
ObjectMeta : metav1.ObjectMeta {
@@ -1111,7 +1111,7 @@ func TestSyncerProcessingSingleResourceWithStatus(t *testing.T) {
1111
1111
CurrentVersion : "v1" ,
1112
1112
},
1113
1113
}),
1114
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
1114
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
1115
1115
},
1116
1116
1117
1117
/////////////////////////////////////////////////////////////////////////////////
@@ -1152,7 +1152,7 @@ func TestSyncerProcessingSingleResourceWithStatus(t *testing.T) {
1152
1152
CurrentVersion : "v1" ,
1153
1153
},
1154
1154
}),
1155
- existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
1155
+ existingState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
1156
1156
1157
1157
expectedRemoteObject : newUnstructured (& dummyv1alpha1.ThingWithStatusSubresource {
1158
1158
ObjectMeta : metav1.ObjectMeta {
@@ -1187,7 +1187,7 @@ func TestSyncerProcessingSingleResourceWithStatus(t *testing.T) {
1187
1187
CurrentVersion : "v1" ,
1188
1188
},
1189
1189
}),
1190
- expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"username":"Colonel Mustard"}}` ,
1190
+ expectedState : `{"apiVersion":"remote.example.corp/v1alpha1","kind":"RemoteThing","metadata":{"name":"my-test-thing"},"spec":{"kink":""," username":"Colonel Mustard"}}` ,
1191
1191
},
1192
1192
}
1193
1193
0 commit comments