From 9948cad1e28693a8a8a7a6e42850a47a48cc239b Mon Sep 17 00:00:00 2001 From: Anna Chernyshova Date: Mon, 24 Jun 2024 09:23:43 -0400 Subject: [PATCH] updated steps md --- step-3-local-development-environment.md | 6 +++--- step-4-connect-to-services.md | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/step-3-local-development-environment.md b/step-3-local-development-environment.md index 6f3cb86..905a605 100644 --- a/step-3-local-development-environment.md +++ b/step-3-local-development-environment.md @@ -81,7 +81,7 @@ So, add the following dependencies as well: ``` ## Create ContainersConfig class under src/test/java -Let's create `ContainersConfig` class under `src/test/java` to configure the required containers. +Let's create `com.testcontainers.catalog.ContainersConfig` class under `src/test/java` to configure the required containers. ```java package com.testcontainers.catalog; @@ -143,7 +143,7 @@ Let's understand what this configuration class does: * We also configured an `ApplicationRunner` bean to create the AWS resources like S3 bucket upon application startup. ## Create TestApplication class under src/test/java -Next, let's create a `TestApplication` class under `src/test/java` to start the application with the Testcontainers configuration. +Next, let's create a `com.testcontainers.catalog.TestApplication` class under `src/test/java` to start the application with the Testcontainers configuration. ```java package com.testcontainers.catalog; @@ -189,7 +189,7 @@ You should get a response similar to the following: ### Upload Product Image ```shell curl -X "POST" 'http://localhost:8080/api/products/P101/image' \ ---form 'file=@"/Users/siva/work/product-p101.jpg"' +--form 'file=@"src/test/resources/P101.jpg"' ``` You should see a response similar to the following: diff --git a/step-4-connect-to-services.md b/step-4-connect-to-services.md index 40ccddd..64ea359 100644 --- a/step-4-connect-to-services.md +++ b/step-4-connect-to-services.md @@ -38,6 +38,12 @@ with the following connection properties: psql -h localhost -p 5432 -U test -d test ``` +If you authenticate with the default password `test` you should be able to and run the following SQL query to check the products: + +```sql +select * from test.public.products; +``` + Similarly, you can connect to any of your containers using the same approach by using the port-mapping feature of Testcontainers Desktop. ###