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

Fix DB initialization on E2E tests #2027

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

hectorgomezv
Copy link
Member

Summary

This PR adds the SSL certificate path to the e2e tests. Otherwise, these tests would fail as they don't mock the database. As PostgresDatabaseModule is now part of the AppModule, the actual Postgres container needs to be available on the e2e test execution context.

Changes

  • Adds POSTGRES_SSL_ENABLED and POSTGRES_SSL_CA_PATH to the e2e-setup.ts configuration.

@hectorgomezv hectorgomezv self-assigned this Oct 16, 2024
@hectorgomezv hectorgomezv requested a review from a team as a code owner October 16, 2024 21:37
@@ -17,8 +15,6 @@ describe('Get about e2e test', () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule.register()],
})
.overrideModule(PostgresDatabaseModule)
Copy link
Member Author

@hectorgomezv hectorgomezv Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to the fix, but this mock was previously added to prevent this initialization error and it's no longer needed.

@hectorgomezv hectorgomezv merged commit 261e7b1 into main Oct 17, 2024
18 checks passed
@hectorgomezv hectorgomezv deleted the fix-db-init-on-e2e-tests branch October 17, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants