-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Entitle com.unboundid.ldap.listener as test package #130706
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -536,7 +536,7 @@ public static void setupEntitlementsForClass() { | |
| if (entitledPackages != null) { | ||
| assert withEntitlementsOnTestCode == false : "Cannot use @WithEntitlementsOnTestCode together with @EntitledTestPackages"; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these contradict each other There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. Why is that? I can imagine a case where we want entitlements enforced on test code, but also want to grant certain test packages. |
||
| assert entitledPackages.value().length > 0 : "No test packages specified in @EntitledTestPackages"; | ||
| TestEntitlementBootstrap.addEntitledTestPackages(entitledPackages.value()); | ||
| TestEntitlementBootstrap.setEntitledTestPackages(entitledPackages.value()); | ||
| } | ||
| } else if (withEntitlementsOnTestCode) { | ||
| throw new AssertionError( | ||
|
|
||
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.
Some ideas:
Another approach might be to make the period at the end mandatory. Then a simple prefix match would work.
A third approach would be to add the period automatically to all prefixes. Again the simple prefix match would work.
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 thought about it. In either case, it shouldn't be lenient. So I either have to check the final dot is not there OR always require it to be there. Not much of a difference imho.