Skip to content

Commit

Permalink
Merge pull request #2 from testcontainers/steps-update
Browse files Browse the repository at this point in the history
updated steps md
  • Loading branch information
GannaChernyshova authored Jun 25, 2024
2 parents da9e7c5 + 9948cad commit e69d050
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions step-3-local-development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions step-4-connect-to-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

###
Expand Down

0 comments on commit e69d050

Please sign in to comment.