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

Support exposing the Audience of a Sequence #7285

Closed

Conversation

CodesbyUnnati
Copy link

Fixes #7185

Proposed Changes

  • 🎁 Support exposing the Audience of a Sequence

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

Support exposing the Audience of a Sequence

Signed-off-by: CodebyUnnati unnaticse2019@gmail.com

Signed-off-by: CodebyUnnati <unnaticse2019@gmail.com>
@knative-prow
Copy link

knative-prow bot commented Sep 22, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: CodesbyUnnati
Once this PR has been reviewed and has the lgtm label, please assign aliok 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
Copy link

knative-prow bot commented Sep 22, 2023

Welcome @CodesbyUnnati! It looks like this is your first PR to knative/eventing 🎉

@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 22, 2023
@knative-prow
Copy link

knative-prow bot commented Sep 22, 2023

Hi @CodesbyUnnati. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@creydr
Copy link
Member

creydr commented Sep 26, 2023

Hello @CodesbyUnnati,
Thanks for your PR! Could you add test to make sure the audience does get set correctly? At least an e2e test would be helpful. You can check e.g. on 7af5d67 or fd863a4 in #7237 where we did something similar for the broker.

@CodesbyUnnati
Copy link
Author

@creydr I need some help in writing the e2e test, I tried understanding the test that you pointed out, but was unable to write it for sequence. Please provide me some pointers in writing the tests.

@creydr
Copy link
Member

creydr commented Oct 10, 2023

@creydr I need some help in writing the e2e test, I tried understanding the test that you pointed out, but was unable to write it for sequence. Please provide me some pointers in writing the tests.

Hello @CodesbyUnnati,
sure. Let me try...
In your test you need to setup a new Sequence and then check, if the audience of the Sequence was set correctly.

We usually split the test-environment configuration and the actual test (called feature for reusability) into different files.

So you have probably to add a function called TestSequenceAudiencePopulated into auth_test.go which includes the test envirenment configuration (probably the same as TestBrokerAudiencePopulated) and then call your test function (via env.Test(...)).
This test then should be placed in a file in test/experimental/features/auth. In this test, you need to run your actual test.
So you need first to setup a Sequence (you can check for an example in test/rekt/features/sequence/feature.go - without the need of sending events) and then check if the sequence has the audience field populated and is correct. For this you can check on the Broker e2e test for an example.

To test only your e2e test, you should then be able to run something like the following:

$ SYSTEM_NAMESPACE=knative-eventing go test -race -count=1 -timeout=1h -parallel=12 -run TestSequenceAudiencePopulated -v -tags=e2e ./test/experimental

I hope this helps

@Cali0707
Copy link
Member

@creydr since #7185 is closed, can we close this PR?

@creydr creydr closed this Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support exposing the Audience of a Sequence
3 participants