-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Task start E2E tests #935
Conversation
/test pull-tekton-cli-integration-tests |
/approve Thanks |
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
test/e2e/task_start_e2e_test.go
Outdated
}) | ||
}) | ||
|
||
t.Run("create buildah resources in namespace "+namespace, func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this not be part of the set up of another test? Why is this it's own test?
test/e2e/task_start_e2e_test.go
Outdated
func getGitResource(namespace string) *v1alpha1.PipelineResource { | ||
return tb.PipelineResource("nocode", namespace, tb.PipelineResourceSpec( | ||
v1alpha1.PipelineResourceTypeGit, | ||
tb.PipelineResourceSpecParam("url", "https://github.com/kelseyhightower/nocode"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not use this repo. Could we use a more legitimate sample application here? The other thing to consider is that we shouldn't have tests be dependent on things outside of our control. We don't own this repository, so it could break these tests one day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using the same in catalog also https://github.com/tektoncd/catalog/blob/v1beta1/buildah/tests/run.yaml#L18 so may be fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we don't need complex tasks like buildah for our e2e, a simple task which has a git resource and param as filename- > and do cat filename is enough for our e2e I think, as we are testing the creation, not execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@piyush-garg updated task as per your comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not using no code still.
I would also actually prefer the original buildah Task. We should have something more complex as we are not gaining much insight out of using a hello world kind of Task. This can also serve as a way to dog food pipelines in ways. I think we gain a lot of value for not just the CLI with testing certain aspects of execution.
8175d32
to
4f36e46
Compare
bcd042c
to
9b4e252
Compare
/test pull-tekton-cli-integration-tests-0_10 |
/approve |
@danielhelfand If this PR looks good, let's add this, will be nice addition for task start in e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
}) | ||
}) | ||
|
||
t.Run("Validate interactive task logs, with follow mode (-f) ", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! Will be good to get more of these interactive tests in e2e scenarios.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielhelfand, piyush-garg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@praveen4g0: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
#945 | [Piyush Garg] Fix release script and yaml | 2020/04/29-13:39 #946 | [Piyush Garg] Update readme for release 0.9.0 | 2020/04/29-14:24 #948 | [Piyush Garg] Fix dockerfile of debbuild | 2020/04/29-17:43 #793 | [Pablo Caderno] Change clusterTask timeout from int to string and remove -t shorthand | 2020/04/30-14:34 #793 | [Pablo Caderno] Removed unnecessary warning message | 2020/04/30-14:34 #952 | [Daniel Helfand] remove default 1h for clustertask --timeout and add tests for invalid timeout | 2020/04/30-16:55 #954 | [Daniel Helfand] remove tkn create -f | 2020/05/01-07:49 #953 | [Vincent Demeester] Bump plumbing to recent master 👼 | 2020/05/01-08:14 #935 | [praveen4g0] Add Task start E2E tests | 2020/05/01-14:06 null | [Anshul Verma] Provides an interactive Prompt to select a Pipeline/PipelineRun/PipelineResources/Task/TaskRun/ClusterTask/ to describe just like what is there in subcommand. | 2020/05/04-07:41 null | [Pradeep Kumar] fix task start with file | 2020/05/06-14:07 null | [Yulia Gaponenko] Update Readme with s390x build usage | 2020/05/07-09:53 null | [Vibhav Bobade] Update triggerbinding and template `list` error messages | 2020/05/08-15:56 null | [Piyush Garg] Enable yaml lint | 2020/05/10-10:19 null | [Piyush Garg] Refactoring for --all-namespace flag | 2020/05/10-10:33 null | [Piyush Garg] Makefile changes for new skipCheckFlag | 2020/05/10-11:38 null | [vinamra28] Fix to provide an error for tkn completion without argument | 2020/05/13-14:00 null | [charles-edouard.breteche] refacto get pipelines version | 2020/05/14-14:01 null | [savitaashture] Add triggers version info to the version command | 2020/05/15-17:25 null | [Daniel Helfand] switch to sigs.k8s.io/yaml for yaml unmarshal | 2020/05/19-04:38 null | [Alan Greene] Fix 'Edit this page' and 'Create an issue' links on the website | 2020/05/19-04:45 null | [Daniel Helfand] move e2e tests into subcommand packages | 2020/05/19-07:53 null | [Shivam Mukhade] Add Task's timeout and Params to Pipeline Desc | 2020/05/19-10:30 null | [Vibhav Bobade] Add no-headers and all-namespaces flags for pipeline resources | 2020/05/19-15:20 null | [Anshul Verma] Provides `--last` option of the `describe` of PipelineRun/TaskRun to describe the most recent PipelineRun/TaskRun | 2020/05/22-13:08 null | [Daniel Helfand] change taskrun and pipelinerun delete test names | 2020/05/26-11:54 null | [Divyansh42] Fix tkn task delete <name> --trs deletes ClusterTaskrun also | 2020/05/26-12:06 null | [chetan-rns] Display conditions in the pipeline describe command | 2020/05/26-12:17 null | [Pradeep Kumar] Task start interactive mode | 2020/05/26-13:53 null | [vinamra28] Fix to provide error in case of no pr logs | 2020/05/26-14:20 null | [Piyush Garg] Bump tektoncd/pipeline to v0.12.1 | 2020/05/28-06:09 null | [Piyush Garg] Bump tektoncd/triggers to v0.5.0 | 2020/06/02-09:28 null | [Divyansh42] Add `--trs` flag in `tkn ct delete` command | 2020/06/03-14:34 null | [savitaashture] Modified TriggerTemplate describe command for ResourceTemplates | 2020/06/05-09:29 null | [Daniel Helfand] fix --keep with tr and pr delete when using --task or --pipeline flag | 2020/06/10-09:05 null | [Chmouel Boudjnah] Fix Debian package having an incorrect package name | 2020/06/10-10:06 null | [Chmouel Boudjnah] Decrease minor release version to zero | 2020/06/10-10:06 null | [Piyush Garg] Bump tektoncd/pipeline to v0.13.0 | 2020/06/10-14:18 Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
Add task start E2E tests, to verify start behaviour
And also refactored cli commands
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes