-
Notifications
You must be signed in to change notification settings - Fork 17
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
integration tests added #75
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ahmetcihank The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Let's move this file to /test/e2e
or /backends/test/e2e
(new) directory.
Similar to Eventing e2e tests: https://github.com/knative/eventing/tree/main/test/e2e
package eventmesh | ||
|
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.
package eventmesh | |
//go:build e2e | |
// +build e2e | |
package eventmesh | |
Again, similar to Eventing e2e tests, let's add a Go build tag, so that the e2e tests are not run by default. We'll create a separate Prow job for it.
https://github.com/knative/eventing/blob/main/test/e2e/broker_channel_flow_test.go#L1-L2
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.
@aliok Thanks a lot ! i am on it.
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 believe this is a good start!
To enable and run tests, additionally, we need to:
- add a
test/e2e-tests.sh
script, similar to:- https://github.com/knative/eventing/blob/main/test/e2e-tests.sh
- that uses https://github.com/knative/eventing/blob/main/test/e2e-common.sh
- Documentation for this and the various "well-known functions" can be found here https://github.com/knative/hack/blob/9c9eed6f6679d33ae7db78d0cfc6f03f7c2aee83/README.md#using-the-e2e-testssh-helper-script
- Once the PR is merged and the
test/e2e-tests.sh
script is present, we can configure Prow to run those jobs as presubmit jobs, an example can be found here: https://github.com/knative/infra/blob/34cd766e4e17f6c5f5c751a99fbcb40b4997a8a1/prow/jobs_config/knative-extensions/eventing-istio.yaml#L7-L20 and those configurations need to be added here https://github.com/knative/infra/blob/main/prow/jobs_config/knative-extensions/backstage-plugins.yaml
tr := &authenticationv1.TokenRequest{ | ||
// TODO: fill up | ||
} |
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.
For this one, I would create a ServiceAccount (SA) with the expected permissions (ClusterRole and ClusterRoleBinding) in test/config/
and apply it as part of the knative_setup
(see my top-level review comment) and then this TokenRequest will use that SA to get an associated token and pass it to eventshub.
E2E auth test added.