Skip to content

Commit

Permalink
Update Create Unit Test for Pipeline v0.62.x
Browse files Browse the repository at this point in the history
  • Loading branch information
khrm committed Aug 13, 2024
1 parent 977dd63 commit 9dbcba2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/resources/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 9dbcba2

Please sign in to comment.