-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[Entitlements] Add test entitlement bootstrap and initialization classes #127814
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
[Entitlements] Add test entitlement bootstrap and initialization classes #127814
Conversation
...ment/src/main/java/org/elasticsearch/entitlement/initialization/EntitlementCheckerUtils.java
Outdated
Show resolved
Hide resolved
pluginPolicies, | ||
null, // TestScopeResolver.createScopeResolver | ||
Map.of(), // TODO: a map that always return nulls? Replace with functor | ||
ENTITLEMENTS_MODULE, // TODO: this will need to change -- encapsulate it when we extract isTriviallyAllowed |
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.
Oh interesting. What do you have in mind here?
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.
If you go with Ryan's suggestion to replace the methods altogether, this will be part of the prod code -- the test code could just test for package name like junit or gradle. I'll wait and see how that evolves :)
Preliminary step for test entitlement initialization, extracted from #127814
Preliminary step for test entitlement initialization, extracted from elastic#127814
Preliminary step for test entitlement initialization, extracted from elastic#127814
Preliminary step for test entitlement initialization, extracted from elastic#127814
Preliminary step for test entitlement initialization, extracted from elastic#127814
Preliminary step for test entitlement initialization, extracted from elastic#127814
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.
A few general comments, looks pretty good
...ramework/src/main/java/org/elasticsearch/entitlement/bootstrap/TestEntitlementBootstrap.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/entitlement/initialization/TestEntitlementInitialization.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/entitlement/initialization/TestEntitlementInitialization.java
Outdated
Show resolved
Hide resolved
…ntitlements-bootstrap-2
…ntitlements-bootstrap-2
…ntitlements-bootstrap-2
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Looks like we'll proceed with this in #128625. |
Entitlement bootstrap and initialization for tests.
It loads the agent, use the TestBuildInfo files to create a test ScopeResolver and to locate and load policies and descriptors for plugins and server.
To be used in
BootstrapForTesting
.