Skip to content

Commit

Permalink
Fixed the issue breaking the tests: namely the older version of testc…
Browse files Browse the repository at this point in the history
…ontainers/dockerDesktop v.4.22.0 that forces mitigations as advised in the issue (testcontainers/testcontainers-java#5121):

1. Logout of Docker Desktop
2. Run a cmd to log into Dockerhub
Up'd the portgresVersion because of a vulnerability in the older version.
  • Loading branch information
beezerbt committed Aug 17, 2023
1 parent 376f156 commit b0b85a8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,27 @@ In this episode:
- Use TestContainers for testing
- Lean more about Kotlin and Java interoperability

##Running the application
## Running the Tests
Here we will outline how best to get started on Windows for running the
tests.
### Windows Docker Desktop Pre-Requisites
1. Docker Desktop (https://docs.docker.com/desktop/install/windows-install/)
2. Admin rights on your host
3. (Optional) Dockerhub account
4. WSL (1 or 2) installed on desktop computer
5. Same user starting Intellij on Windows should be part of the Docker User Group on Windows
6. Without this, it becomes very difficult if not impossible to have Intellij
successfully connect to Docker Desktop successfully (tried multiple combinations)
### Windows Podman
1. Podman for Windows https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md)<br>
If you do not have Admin rights to your host Podman is for you

## Running the Application

First, start PostgreSQL database by running this command (assuming you have Docker installed on the machine):

docker run -e POSTGRES_PASSWORD=password -e POSTGRES_USER=sa -p 5432:5432 -d postgres

Now you can launch Spring Boot application:

./gradlew bootRun
./gradlew bootRun
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ group = "com.example"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_11

val testcontainersVersion = "1.15.3"
val postgresVersion="42.2.14"
val testcontainersVersion = "1.18.3"
val postgresVersion= "42.2.27"

repositories {
mavenCentral()
Expand Down

0 comments on commit b0b85a8

Please sign in to comment.