Skip to content

Commit

Permalink
Fix unit test to work with copied TaskSpec instead of TaskRef
Browse files Browse the repository at this point in the history
  • Loading branch information
abayer committed Jan 28, 2019
1 parent 0308cb7 commit 08c6aaf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/reconciler/v1alpha1/pipelinerun/pipelinerun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,15 @@ func TestReconcile(t *testing.T) {
),
tb.TaskRunLabel("pipeline.knative.dev/pipeline", "test-pipeline"),
tb.TaskRunLabel("pipeline.knative.dev/pipelineRun", "test-pipeline-run-success"),
tb.TaskRunSpec(tb.TaskRunTaskRef("unit-test-task"),
tb.TaskRunSpec(tb.TaskRunTaskSpec(
tb.TaskInputs(
tb.InputsResource("workspace", v1alpha1.PipelineResourceTypeGit),
tb.InputsParam("foo"), tb.InputsParam("bar"), tb.InputsParam("templatedparam"),
),
tb.TaskOutputs(
tb.OutputsResource("image-to-use", v1alpha1.PipelineResourceTypeImage),
tb.OutputsResource("workspace", v1alpha1.PipelineResourceTypeGit),
)),
tb.TaskRunServiceAccount("test-sa"),
tb.TaskRunInputs(
tb.TaskRunInputsParam("foo", "somethingfun"),
Expand Down

0 comments on commit 08c6aaf

Please sign in to comment.