Skip to content

Add e2e test for Choice#1642

Merged
knative-prow-robot merged 1 commit into
knative:masterfrom
lionelvillard:choice-e2e
Aug 6, 2019
Merged

Add e2e test for Choice#1642
knative-prow-robot merged 1 commit into
knative:masterfrom
lionelvillard:choice-e2e

Conversation

@lionelvillard
Copy link
Copy Markdown
Contributor

Fixes #1590

Proposed Changes

  • Add one Choice e2e test

Not perfect as it misses an assertion about not having a message in the log.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 5, 2019
@knative-prow-robot knative-prow-robot added the area/test-and-release Test infrastructure, tests or release label Aug 5, 2019
@lionelvillard
Copy link
Copy Markdown
Contributor Author

/ok-to-test

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Aug 5, 2019
@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Aug 6, 2019

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lionelvillard, vaikas-google

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2019
@knative-prow-robot knative-prow-robot merged commit da1c913 into knative:master Aug 6, 2019
}
}

// EventFilteringPod creates a Pod that either filter or send the received CloudEvent
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// EventFilteringPod creates a Pod that either filter or send the received CloudEvent
// EventFilteringPod creates a Pod that either filters or sends the received CloudEvent.

}

func main() {
// parse the command line flags
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// parse the command line flags
// Parse the command line flags.

Comment thread test/e2e/choice_test.go
expected string
}{
{
name: "two-cases-pass-first-case-only",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not make these two separate test cases? That way we can remove a for loop below:

	table := []struct {
		name        string
		casesConfig caseConfig
		expected    string
	}{
		{
			name: "don't filter",
			casesConfig: caseConfig{
				filter: false,
			},
		},
		{
			name: "filter",
			casesConfig: caseConfig{
				filter: true,
			},
			expected: "choice-filter",
		},
	}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

One choice can have multiple cases. It's a bit confusing because there is only one test (more to come).

@lionelvillard lionelvillard deleted the choice-e2e branch January 20, 2020 14:59
pierDipi pushed a commit to pierDipi/eventing that referenced this pull request Mar 14, 2022
…ve#1642)

* Different cron times for branches

* Wrap function invocations in quotes

* Add instructions

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

Co-authored-by: Ali Ok <aliok@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. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Add E2E tests for Choice CRD

5 participants