-
Notifications
You must be signed in to change notification settings - Fork 595
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
provision sequence audience using channel audience #7387
provision sequence audience using channel audience #7387
Conversation
Welcome @md-saif-husain! It looks like this is your first PR to knative/eventing 🎉 |
Hi @md-saif-husain. 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 Once the patch is verified, the new status will be reflected by the 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. |
ba35469
to
c2226f2
Compare
/ok-to-test |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7387 +/- ##
==========================================
+ Coverage 76.74% 76.79% +0.04%
==========================================
Files 253 253
Lines 13916 14098 +182
==========================================
+ Hits 10680 10826 +146
- Misses 2702 2732 +30
- Partials 534 540 +6 ☔ View full report in Codecov by Sentry. |
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.
Thanks @md-saif-husain for your PR.
Looks good so far. Only left a small comment. Could you also add an e2e test for it?
You can check on
eventing/test/auth/oidc_test.go
Lines 58 to 74 in 392b535
func TestChannelImplSupportsOIDC(t *testing.T) { | |
t.Parallel() | |
ctx, env := global.Environment( | |
knative.WithKnativeNamespace(system.Namespace()), | |
knative.WithLoggingConfig, | |
knative.WithTracingConfig, | |
k8s.WithEventListener, | |
environment.Managed(t), | |
environment.WithPollTimings(4*time.Second, 12*time.Minute), | |
) | |
name := feature.MakeRandomK8sName("channelimpl") | |
env.Prerequisite(ctx, t, channel.ImplGoesReady(name)) | |
env.Test(ctx, t, oidc.AddressableHasAudiencePopulated(channel_impl.GVR(), channel_impl.GVK().Kind, name, env.Namespace())) | |
} |
Sure I will add e2e test . Let me know if I can add them in same file as above or it should be new file |
Same file should be fine here. |
10e4c93
to
f31db3a
Compare
f31db3a
to
3aab74e
Compare
/retest |
test/auth/oidc_test.go
Outdated
Spec: map[string]interface{}{}, | ||
}))) | ||
|
||
env.Test(ctx, t, oidc.SequenceHasAudienceOfInputChannel(sequence.GVR(), sequence.GVK().Kind, name, env.Namespace())) |
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.
env.Test(ctx, t, oidc.SequenceHasAudienceOfInputChannel(sequence.GVR(), sequence.GVK().Kind, name, env.Namespace())) | |
env.Test(ctx, t, oidc.SequenceHasAudienceOfInputChannel(name, env.Namespace(), channel_impl.GVR(), channel_impl.GVK().Kind)) |
SequenceHasAudienceOfInputChannel
has different parameters:
func SequenceHasAudienceOfInputChannel(sequenceName, sequenceNamespace string, channelGVR schema.GroupVersionResource, channelKind string) *feature.Feature { |
Should fix the build issues:
# knative.dev/eventing/test/auth [knative.dev/eventing/test/auth.test]
test/auth/oidc_test.go:118:58: cannot use sequence.GVR() (value of type "k8s.io/apimachinery/pkg/runtime/schema".GroupVersionResource) as string value in argument to oidc.SequenceHasAudienceOfInputChannel
test/auth/oidc_test.go:118:95: cannot use name (variable of type string) as "k8s.io/apimachinery/pkg/runtime/schema".GroupVersionResource value in argument to oidc.SequenceHasAudienceOfInputChannel
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.
Thanks a lot for you contribution @md-saif-husain
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, md-saif-husain 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 |
Fixes #7294
Proposed Changes
status.Address.Audience
Release Note