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

1318: Setup backend test database #1536

Merged
merged 2 commits into from
Jul 31, 2024
Merged

Conversation

seluianova
Copy link
Contributor

@seluianova seluianova commented Jul 15, 2024

Short description

To add integration tests for the backend (#1532), we need to setup a database.
In my opinion, using test containers library is the most convenient way to implement that.

Proposed changes

Add IntegrationTest base class, where database setup is performed.
To add new tests that require a database, new test classes must extend the IntegrationTest class.

Side effects

Would be nice to check if everything works on different OS.
I have only tested it on Ubuntu 22.04.4 LTS.

Resolved issues

Fixes: #1318

@seluianova seluianova linked an issue Jul 15, 2024 that may be closed by this pull request
@seluianova seluianova force-pushed the 1318-setup-backend-test-database branch 7 times, most recently from c1e2e38 to 64ed529 Compare July 16, 2024 10:07
@seluianova seluianova marked this pull request as ready for review July 16, 2024 10:16
@seluianova seluianova force-pushed the 1318-setup-backend-test-database branch from 64ed529 to f49e1eb Compare July 16, 2024 11:51
Copy link
Contributor

@f1sh1918 f1sh1918 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tested on MacOS
Just one question. How can i trigger all tests at once?
Just found out how to trigger every single one.
The test execution should be added to circle ci check_backend even these are only temporary tests.

Nicely done :) 👍

@seluianova
Copy link
Contributor Author

seluianova commented Jul 22, 2024

@f1sh1918
All backend tests are run with ./gradlew test, so the new tests are also included in CI already and passed

Copy link
Contributor

@f1sh1918 f1sh1918 left a comment

Choose a reason for hiding this comment

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

Ok i think everything should be fine.

gradle test does not work for because of some jvm issue but that should rely on my local configuration
Have to fix that
But in intelliJ test container and tests work

@seluianova
Copy link
Contributor Author

@f1sh1918 try gradlew instead of gradle, it means “gradle wrapper”

@seluianova
Copy link
Contributor Author

@ztefanie could you please also check that you can run the new tests locally?

@f1sh1918
Copy link
Contributor

maybe @steffenkleinle can test it, since steffi will be on vacation

@f1sh1918
Copy link
Contributor

f1sh1918 commented Jul 25, 2024

@f1sh1918 try gradlew instead of gradle, it means “gradle wrapper”

doesn't help. its my local jvm config. nevermind

Update: Fixed my jvm installation @seluianova works fine now :)

Copy link
Member

@steffenkleinle steffenkleinle left a comment

Choose a reason for hiding this comment

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

Tested, works for me!

@seluianova seluianova merged commit 328f340 into main Jul 31, 2024
1 check passed
@seluianova seluianova deleted the 1318-setup-backend-test-database branch July 31, 2024 10:21
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.

Setup backend test database
4 participants