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

[ALS-7687] Create PSAMA cache unit test #232

Merged
merged 6 commits into from
Oct 30, 2024
Merged

[ALS-7687] Create PSAMA cache unit test #232

merged 6 commits into from
Oct 30, 2024

Conversation

Gcolon021
Copy link
Contributor

  • Removed duplicate test files.
  • Updated pom.xml to appropriately leverage Spring dependencies.
  • Removed unused dependencies.
  • Migrated test classes from JUnit 4 to JUnit 5, replacing before with beforeeach, @test(expected) with assertThrows, and RunWith with @SpringBootTest/@ContextConfiguration annotations. Updated Mockito annotations to @MockBean where appropriate and used dependency injection with @Autowired to initialize services.
  • Added unit tests for caching mechanisms

Updated the project parent to `spring-boot-starter-parent` with version `3.3.5`. Consolidated and streamlined dependencies to align with Spring Boot configurations, ensuring compatibility and removing redundant entries.
Migrated test classes from JUnit 4 to JUnit 5, replacing @before with @beforeeach, @test(expected) with assertThrows, and @RunWith with @SpringBootTest/@ContextConfiguration annotations. Updated Mockito annotations to @MockBean where appropriate and used dependency injection with @Autowired to initialize services.
Introduced `CacheTest` to validate caching behavior in `AccessRuleService` and `UserService`. These tests ensure the correct usage of caches like `mergedRulesCache`, `preProcessedAccessRules`, and `mergedTemplateCache`, and verify proper eviction mechanisms.
@Gcolon021 Gcolon021 added enhancement New feature or request dependencies Pull requests that update a dependency file labels Oct 28, 2024
@Gcolon021 Gcolon021 self-assigned this Oct 28, 2024
@Gcolon021 Gcolon021 removed the dependencies Pull requests that update a dependency file label Oct 28, 2024
@Luke-Sikina
Copy link
Member

I know this is just tests, but we should deploy this somewhere and make sure it still works because you did rewrite the pom

@Gcolon021
Copy link
Contributor Author

@Luke-Sikina Absolutely, I will deploy it to BDC now and report back.

Changed the Dockerfile COPY commands to use a wildcard for JAR filenames, ensuring compatibility with differing build outputs. Additionally, added the packaging type as 'jar' in the pom.xml to standardize project packaging.
@Gcolon021
Copy link
Contributor Author

I have updated the pom.xml and dockerfiles to resolve issues found during deployment. After the updates I was able to deploy to Nhanes dev and verify that PSAMA is working as intended.

Included the `aws-secretsmanager-jdbc` dependency in the pom.xml to support secure secrets management with AWS Secrets Manager. This change aims to enhance security by integrating Secrets Manager into the authentication services.
@Gcolon021 Gcolon021 merged commit 62d030f into release Oct 30, 2024
3 checks passed
@Gcolon021 Gcolon021 deleted the ALS-7687 branch October 30, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants