Skip to content
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

Merged
merged 1 commit into from
May 1, 2020
Merged

Conversation

praveen4g0
Copy link

@praveen4g0 praveen4g0 commented Apr 24, 2020

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:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

See the contribution guide
for more details.

Release Notes

release-note

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 24, 2020

CLA Check
The committers are authorized under a signed CLA.

  • ✅ Praveen Kumar Reddy Thangadancha (55adb49f00991da8f5ee868b68f43970f768bb3b, 2bda27aa419ab22b72931d7fe5ba6f10391a4102)

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 24, 2020
@praveen4g0 praveen4g0 changed the title Add Task start E2E tests [WIP]Add Task start E2E tests Apr 25, 2020
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 25, 2020
@praveen4g0 praveen4g0 changed the title [WIP]Add Task start E2E tests Add Task start E2E tests Apr 25, 2020
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 25, 2020
@piyush-garg
Copy link
Contributor

/test pull-tekton-cli-integration-tests

@piyush-garg
Copy link
Contributor

/approve
/meow

Thanks

@tekton-robot
Copy link
Contributor

@piyush-garg: cat image

In response to this:

/approve
/meow

Thanks

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.

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2020
})
})

t.Run("create buildah resources in namespace "+namespace, func(t *testing.T) {
Copy link
Member

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 Show resolved Hide resolved
test/e2e/task_start_e2e_test.go Outdated Show resolved Hide resolved
test/e2e/task_start_e2e_test.go Show resolved Hide resolved
func getGitResource(namespace string) *v1alpha1.PipelineResource {
return tb.PipelineResource("nocode", namespace, tb.PipelineResourceSpec(
v1alpha1.PipelineResourceTypeGit,
tb.PipelineResourceSpecParam("url", "https://github.com/kelseyhightower/nocode"),
Copy link
Member

@danielhelfand danielhelfand Apr 25, 2020

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.

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Member

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.

test/e2e/task_start_e2e_test.go Outdated Show resolved Hide resolved
test/e2e/task_start_e2e_test.go Outdated Show resolved Hide resolved
test/e2e/task_start_e2e_test.go Outdated Show resolved Hide resolved
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 25, 2020
@praveen4g0 praveen4g0 force-pushed the cli-e2e branch 3 times, most recently from 8175d32 to 4f36e46 Compare April 27, 2020 09:58
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 27, 2020
@praveen4g0 praveen4g0 force-pushed the cli-e2e branch 2 times, most recently from bcd042c to 9b4e252 Compare April 27, 2020 10:35
@praveen4g0
Copy link
Author

/test pull-tekton-cli-integration-tests-0_10

@piyush-garg
Copy link
Contributor

/approve

test/e2e/helper.go Outdated Show resolved Hide resolved
@piyush-garg
Copy link
Contributor

@danielhelfand If this PR looks good, let's add this, will be nice addition for task start in e2e

Copy link
Member

@danielhelfand danielhelfand left a 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) {
Copy link
Member

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.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 1, 2020
@tekton-robot
Copy link
Contributor

[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:
  • OWNERS [danielhelfand,piyush-garg]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot merged commit 08b99c7 into tektoncd:master May 1, 2020
@tekton-robot
Copy link
Contributor

@praveen4g0: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-tekton-cli-integration-tests a0a02db link /test pull-tekton-cli-integration-tests

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.

chmouel added a commit that referenced this pull request Jun 10, 2020
#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants