Fix AAA initialization issue#2575
Conversation
Summary of ChangesHello @Tobianas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on a significant upgrade of the testing infrastructure from JUnit 4 to JUnit 5 across multiple modules, ensuring modern testing practices and improved maintainability. Concurrently, it resolves a critical bug in the AAA module's database user initialization, enhancing system robustness. A minor but important enhancement was also made to the Jetty server to support session handling. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request primarily focuses on updating test classes across various modules to use JUnit 5 annotations (@Test, @BeforeEach, @AfterEach, @BeforeAll, @AfterAll) and assertions (Assertions.assertEquals, Assertions.assertTrue, etc.) instead of JUnit 4 and TestNG. It also updates the pom.xml files to reflect the JUnit 5 dependencies. Additionally, there's a critical fix in AAALightyShiroProvider.java to correctly handle user creation in the AAA module, ensuring that pre-seeded users are created only if they don't already exist and logging appropriate messages. A minor change in AbstractLightyWebServer.java adds a session handler to the servlet context. Overall, the changes improve the testing framework and address a potential initialization issue in the AAA module.
lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/pom.xml
Outdated
Show resolved
Hide resolved
lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/pom.xml
Outdated
Show resolved
Hide resolved
Custom credentials from testConfig.json were ignored due to a database initialization collision with OpenDaylight's BasicRealmAuthProvider. JIRA: LIGHTY-426 Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Add session handler to jetty server initialization to remove the exception which was being thrown when using authentication: java.lang.IllegalStateException: No SessionManager" JIRA: LIGHTY-426 Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
To create IdmLightConfig, just a regular username was being used instead of the expected DbUsername from AAA configuration. JIRA: LIGHTY-426 Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
No description provided.