Skip to content

Commit e9ff935

Browse files
committed
tests: remove expected null creationTimestamp
1 parent 8d3b2d4 commit e9ff935

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/template/templateprocessing/template_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func TestProcessValue(t *testing.T) {
222222
if err != nil {
223223
t.Fatalf("unexpected error during encoding Config: %#v", err)
224224
}
225-
expect := `{"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{"creationTimestamp":null},"objects":[{"apiVersion":"v1","kind":"Service","metadata":{"labels":{"i1":1,"invalidjsonarray":"[\"key\":\"value\"","invalidjsonmap":"{\"key\":\"value\"","key1":"1","key2":"$1","quoted_string":"string1","s1_s1":"string1_string1","s1_s2":"string1_string2","untouched":"a${{INT_1}}","untouched2":"${{INT_1}}a","untouched3":"${{INVALID_PARAMETER}}","untouched4":"${{INVALID PARAMETER}}","validjsonarray":["key","value"],"validjsonmap":{"key":"value"}}}}],"parameters":[{"name":"VALUE","value":"1"},{"name":"STRING_1","value":"string1"},{"name":"STRING_2","value":"string2"},{"name":"INT_1","value":"1"},{"name":"VALID_JSON_MAP","value":"{\"key\":\"value\"}"},{"name":"INVALID_JSON_MAP","value":"{\"key\":\"value\""},{"name":"VALID_JSON_ARRAY","value":"[\"key\",\"value\"]"},{"name":"INVALID_JSON_ARRAY","value":"[\"key\":\"value\""}]}`
225+
expect := `{"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{},"objects":[{"apiVersion":"v1","kind":"Service","metadata":{"labels":{"i1":1,"invalidjsonarray":"[\"key\":\"value\"","invalidjsonmap":"{\"key\":\"value\"","key1":"1","key2":"$1","quoted_string":"string1","s1_s1":"string1_string1","s1_s2":"string1_string2","untouched":"a${{INT_1}}","untouched2":"${{INT_1}}a","untouched3":"${{INVALID_PARAMETER}}","untouched4":"${{INVALID PARAMETER}}","validjsonarray":["key","value"],"validjsonmap":{"key":"value"}}}}],"parameters":[{"name":"VALUE","value":"1"},{"name":"STRING_1","value":"string1"},{"name":"STRING_2","value":"string2"},{"name":"INT_1","value":"1"},{"name":"VALID_JSON_MAP","value":"{\"key\":\"value\"}"},{"name":"INVALID_JSON_MAP","value":"{\"key\":\"value\""},{"name":"VALID_JSON_ARRAY","value":"[\"key\",\"value\"]"},{"name":"INVALID_JSON_ARRAY","value":"[\"key\":\"value\""}]}`
226226
stringResult := strings.TrimSpace(string(result))
227227
if expect != stringResult {
228228
//t.Errorf("unexpected output, expected: \n%s\nGot:\n%s\n", expect, stringResult)
@@ -249,7 +249,7 @@ func TestEvaluateLabels(t *testing.T) {
249249
]
250250
}`,
251251
Output: `{
252-
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{"creationTimestamp":null},
252+
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{},
253253
"objects":[
254254
{
255255
"apiVersion":"v1","kind":"Service","metadata":{
@@ -269,7 +269,7 @@ func TestEvaluateLabels(t *testing.T) {
269269
]
270270
}`,
271271
Output: `{
272-
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{"creationTimestamp":null},
272+
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{},
273273
"objects":[
274274
{
275275
"apiVersion":"v1","kind":"Service","metadata":{
@@ -295,7 +295,7 @@ func TestEvaluateLabels(t *testing.T) {
295295
]
296296
}`,
297297
Output: `{
298-
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{"creationTimestamp":null},
298+
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{},
299299
"objects":[
300300
{
301301
"apiVersion":"v1","kind":"Service",
@@ -318,7 +318,7 @@ func TestEvaluateLabels(t *testing.T) {
318318
]
319319
}`,
320320
Output: `{
321-
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{"creationTimestamp":null},
321+
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{},
322322
"objects":[
323323
{
324324
"apiVersion":"v1","kind":"Service","metadata":{
@@ -350,7 +350,7 @@ func TestEvaluateLabels(t *testing.T) {
350350
]
351351
}`,
352352
Output: `{
353-
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{"creationTimestamp":null},
353+
"kind":"Template","apiVersion":"template.openshift.io/v1","metadata":{},
354354
"objects":[
355355
{
356356
"apiVersion":"v1","kind":"Service","metadata":{

0 commit comments

Comments
 (0)