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

integration tests added #75

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ahmetcihank
Copy link
Contributor

E2E auth test added.

@knative-prow knative-prow bot requested review from Cali0707 and pierDipi July 23, 2024 11:04
Copy link

knative-prow bot commented Jul 23, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ahmetcihank
Once this PR has been reviewed and has the lgtm label, please assign pierdipi for approval. For more information see the Kubernetes Code Review Process.

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

@knative-prow knative-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 23, 2024
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 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

Comment on lines 1 to 2
package eventmesh

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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

Copy link
Contributor Author

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.

Copy link
Member

@pierDipi pierDipi left a 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:

Comment on lines +46 to +48
tr := &authenticationv1.TokenRequest{
// TODO: fill up
}
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants