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 TestBuilder for TriggerCRD #680

Merged
merged 1 commit into from
Aug 21, 2020
Merged

Conversation

khrm
Copy link
Contributor

@khrm khrm commented Jul 21, 2020

TestBuilder for TriggerCRD added. Also, Eventlistener test builder modified to remove the Trigger function used internally.

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 21, 2020
@khrm khrm force-pushed the triggerTB branch 2 times, most recently from 0fabe5f to cfafc99 Compare July 21, 2020 14:53
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@dibyom
Copy link
Member

dibyom commented Jul 21, 2020

Should we wait till TEP is merged before we add this?

@khrm khrm force-pushed the triggerTB branch 4 times, most recently from 9132c29 to e418002 Compare August 20, 2020 16:56
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@khrm
Copy link
Contributor Author

khrm commented Aug 20, 2020

@dibyom Can we get this merged now?

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@@ -373,18 +399,6 @@ func Test_ResolveTrigger(t *testing.T) {
},
want: ResolvedTrigger{TriggerBindings: []*triggersv1.TriggerBinding{}, ClusterTriggerBindings: []*triggersv1.ClusterTriggerBinding{}, TriggerTemplate: &tt},
},
{
name: "multiple bindings with builder",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this as we already have similar test just below.

trigger: bldr.Trigger("my-triggertemplate", "v1alpha1",
bldr.EventListenerTriggerBinding("invalid-tb-name", "", "invalid-tb-name", "v1alpha1"),
),
trigger: func() triggersv1.EventListenerTrigger {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's switch these tests to directly use triggersv1.EventListenerTrigger too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

TestBuilder for TriggerCRD added. Also, Eventlistener test builder
modified to remove the Trigger function used internally.
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/builder/eventlistener.go 79.0% 78.8% -0.3
test/builder/trigger.go Do not exist 93.6%

@dibyom
Copy link
Member

dibyom commented Aug 21, 2020

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 21, 2020
@tekton-robot tekton-robot merged commit a07f6b0 into tektoncd:master Aug 21, 2020
@khrm khrm deleted the triggerTB branch July 28, 2021 14:26
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants