Skip to content

Commit d599c2d

Browse files
SonichigoEraKin575
authored andcommitted
fix: express-mongoose readme with docker-compose up (#28)
Signed-off-by: Animesh <kurosakiichigo.songoku@gmail.com> Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
1 parent ba58969 commit d599c2d

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

express-mongoose/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,11 @@ We need create an alias for Keploy:
129129
alias keploy='sudo docker run --pull always --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v "$(pwd)":/files -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy'
130130
```
131131

132-
## Let's start the MongoDB Instance
133-
```bash
134-
docker-compose up -d
135-
```
136-
137132
## Capture the testcases
138-
1. We first need to build dockerimage of our application:-
139-
```bash
140-
docker build -t node-app:1.0 .
141-
```
142-
143-
2. Now we will run the keploy in record mode:-
133+
134+
We will run the keploy in record mode with docker-compose to start our application:-
144135
```bash
145-
keploy record -c "docker run -p 8000:8000 --name nodeMongoApp --network keploy-network node-app:1.0"
136+
keploy record -c "docker compose up" --containerName "nodeMongoApp"
146137
```
147138

148139
#### Let's generate the testcases.
@@ -173,7 +164,7 @@ We will get the following output in our terminal
173164
## Running the testcases
174165

175166
```bash
176-
keploy test -c "docker run -p 8000:8000 --name nodeMongoApp --network keploy-network node-app:1.0" --delay 10
167+
keploy test -c "docker compose up --node-app" --containerName "nodeMongoApp" --delay 10
177168
```
178169

179170
Our testcases will fail as the Keep-Alive connection won't be available when we are using testmode, this happen because in test mode the Keploy uses the `Mocks.yml`, which was generated in the record mode.

0 commit comments

Comments
 (0)