pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

Custom Task controller for testing

Open lbernick opened this issue 2 years ago • 2 comments

In order to write better integration/e2e tests for custom Tasks, it would be useful to have a controller that watches for Runs of some kind we just use for testing, and install this controller when running e2e tests. This controller could do any of:

  • wait indefinitely
  • set the status to "succeeded"
  • set the status to match some boolean succeeded/failed set in the spec.

This controller shouldn't be packaged with Tekton releases.

lbernick avatar Jul 11 '22 17:07 lbernick

planning to reuse https://github.com/tektoncd/experimental/tree/main/wait-task for this

jerop avatar Jul 11 '22 17:07 jerop

/assign XinruZhang

XinruZhang avatar Aug 09 '22 14:08 XinruZhang

Thanks for writing the issue Lee! I may need some extra clarifications:

set the status to match some boolean succeeded/failed set in the spec.

Do you mean we define some boolean fields in the spec and set those fields in status as what are set in the spec.

This controller shouldn't be packaged with Tekton releases.

Will codes under test/ be packaged with Tekton release?

XinruZhang avatar Aug 16 '22 18:08 XinruZhang

Hi @lbernick what do we need for the wait infinitely? Is the current wait-task controller enough?

XinruZhang avatar Aug 24 '22 13:08 XinruZhang

This was just a suggestion of what we could write the controller to do-- I was just brainstorming simple behaviors that are easy to understand for testing. It really depends on what tests we want to add and what controller behavior would be most helpful for those tests. It seems to me like the wait task has given us what we need? So I'm going to close this as completed in #5332.

lbernick avatar Aug 24 '22 14:08 lbernick