syncstream-dev / syncstream-backend

Java + SpringBoot backend for SyncStream Application
GNU General Public License v2.0
2 stars 2 forks source link

Feature/#13 integrate database #16

Closed Xu-Gavin closed 8 months ago

Xu-Gavin commented 8 months ago

Closes #13.

I added basic support with Cassandra database for the User model. Future models will be supported later.

Testcontainers was not implemented. Integration with testcontainers is was not successful and will be addressed in issue #15. Though, I've added the dependencies for the testcontainers already in build.gradle.

Xu-Gavin commented 8 months ago

@itsmarsss There is a failing test, let me try to resolve it before reviewing.

Xu-Gavin commented 8 months ago

@itsmarsss There is a failing test, let me try to resolve it before reviewing.

Test seems to fail because theres no Cassandra database docker container running on GitHub's CI environment...

Xu-Gavin commented 8 months ago

Test will not fail when docker image is running in the background with default initialization:

docker run -p 9042:9042 --rm --name cassandra -d cassandra:4.0.7
docker exec -it cassandra bash -c "cqlsh -u cassandra -p cassandra"
CREATE KEYSPACE spring_cassandra WITH replication = {'class' : 'SimpleStrategy', 
'replication_factor' : 1};

Screen Shot 2023-12-07 at 11 38 44 AM

Otherwise, it will fail. I will push a commit that attempts to run a cassandra service in the background on Github Actions.

Xu-Gavin commented 8 months ago

Fixed failing context tests by initializing a Cassandra Service on GitHub Actions. Assigning PR to @itsmarsss for review.