From b133ef7b0d689c78a342879411a78c74b89de1f5 Mon Sep 17 00:00:00 2001 From: Khurram Baig Date: Fri, 16 Aug 2024 15:53:45 +0530 Subject: [PATCH] Update Create Unit Test for Pipeline v0.62.x --- pkg/resources/create_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/resources/create_test.go b/pkg/resources/create_test.go index 69b8b0549..3d8f28508 100644 --- a/pkg/resources/create_test.go +++ b/pkg/resources/create_test.go @@ -142,7 +142,7 @@ func TestCreateResource(t *testing.T) { want pipelinev1.TaskRun }{{ name: "TaskRun without namespace", - json: json.RawMessage(`{"kind":"TaskRun","apiVersion":"tekton.dev/v1beta1","metadata":{"name":"my-taskrun","creationTimestamp":null,"labels":{"someLabel":"bar"}},"spec":{"serviceAccountName":"","taskRef":{"name":"my-task"}},"status":{"podName": ""}}`), + json: json.RawMessage(`{"kind":"TaskRun","apiVersion":"tekton.dev/v1beta1","metadata":{"name":"my-taskrun","creationTimestamp":null,"labels":{"someLabel":"bar"}},"spec":{"serviceAccountName":"","taskRef":{"name":"my-task"}},"status":{"artifacts":{},"podName": ""}}`), want: pipelinev1.TaskRun{ TypeMeta: metav1.TypeMeta{ APIVersion: "tekton.dev/v1beta1", @@ -168,7 +168,7 @@ func TestCreateResource(t *testing.T) { { name: "TaskRun with namespace", - json: json.RawMessage(`{"kind":"TaskRun","apiVersion":"tekton.dev/v1beta1","metadata":{"name":"my-taskrun","namespace":"bar","creationTimestamp":null,"labels":{"someLabel":"bar"}},"spec":{"serviceAccountName":"","taskRef":{"name":"my-task"}},"status":{"podName":""}}`), + json: json.RawMessage(`{"kind":"TaskRun","apiVersion":"tekton.dev/v1beta1","metadata":{"name":"my-taskrun","namespace":"bar","creationTimestamp":null,"labels":{"someLabel":"bar"}},"spec":{"serviceAccountName":"","taskRef":{"name":"my-task"}},"status":{"artifacts":{},"podName":""}}`), want: pipelinev1.TaskRun{ TypeMeta: metav1.TypeMeta{ APIVersion: "tekton.dev/v1beta1",