-
Notifications
You must be signed in to change notification settings - Fork 250
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
Improve CLI e2e go tests #505
Conversation
Hi @praveen4g0. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@praveen4g0: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
/ok-to-test |
/rerun pull-tekton-cli-unit-tests |
/test pull-tekton-cli-unit-tests |
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
Let's get this in and iterate over it
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester 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 |
/retest |
IMHO we need to figure out about the flakyness of go-netflix before merging this, see #499 for details. Feel free to remove this /hold if you tink otherwise /hold |
/test pull-tekton-cli-build-tests |
The following is the coverage report on pkg/.
|
/test pull-tekton-cli-unit-tests |
1 similar comment
/test pull-tekton-cli-unit-tests |
/test pull-tekton-cli-integration-tests |
@vdemeester do you see still see any blocker to merge this pr?? |
/hold cancel |
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.
Overall, I am struggling with the structure of these e2e tests in this pr. My apologies as this is the first time I am reviewing this and this pr is large in general, but I wanted to clarify some things before this moves forward:
- Do we know how much of the old suite of tests is covered in this conversion/ how similar the tests are? I'll start doing a more thorough review of this as well.
- I get that this is a first attempt to get all the e2e tests over to go, but the organization of the tests themselves is hard to follow.
pipeline_e2e_test.go
should be broken up into different files, but that's perhaps something we need to iterate on.
test/e2e/build_templates.go
Outdated
func GetTaskRun(c *Clients, name string) *v1alpha1.TaskRun { | ||
|
||
taskRun, err := c.TaskRunClient.Get(name, metav1.GetOptions{}) | ||
// require.Nil(t, err) |
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.
Can all the commented out code be removed?
// require.Nil(t, err)
I'm temporarly adding back the old ones to make sure we don't loose coverage
Yep, I plan to follow-up to clean a little bit of stuff and split those tests and organize them a little bit better 😉 |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
}) | ||
|
||
}) | ||
// Bug to fix |
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.
Can this comment be removed, or is there something to denote here?
|
||
// Assert compares the Result against the Expected struct, and fails the test if | ||
// any of the expectations are not met. | ||
// |
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.
This can be removed
I am fine with moving forward with this after the nit comments are dealt with. If we could have just one other person review, I think this should be good to go. |
go.mod
Outdated
go.uber.org/multierr v1.1.0 | ||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 | ||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 |
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.
https://godoc.org/golang.org/x/xerrors
These functions were incorporated into the standard library's errors package in Go 1.13
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.
@ppitonak indeed (with a slight signature change). Anyway, we can get rid of those in a follow-up (also, depending on our dependency it might become a transitive dep anway)
updated e2e.sh Added tkn environment varaiable Updated pipelines E2E tests Update go.sum Deleted third-party updated go.mod update pipeline, interactive cli Tests Fix: update client.go with lates pipeline bump (v0.10.1) fixed: golint error Fix: Pipeline start assertion Update README.md Fix: build failures Signed-off-by: Vincent Demeester <vdemeest@redhat.com> Add old e2e tests back while we port them to go Signed-off-by: Vincent Demeester <vdemeest@redhat.com> Small fixes to commented code Signed-off-by: Vincent Demeester <vdemeest@redhat.com> Update test/resources/output-pipelinerun.yaml Drop the flag to InitializeLogger
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
Thanks for all your work on this @praveen4g0!
Changes
I have Added E2E cli tests for pipelines alone.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make docs
andmake man
if needed.make check
See the contribution guide
for more details.
Release Notes