Fix pubsub JS tests (#582)

Signed-off-by: tanvigour <tanvi.gour@gmail.com>
This commit is contained in:
tanvigour 2022-03-08 15:14:45 -05:00 committed by GitHub
parent 4579c1657b
commit a5b8b58ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 63 deletions

View File

@ -16,84 +16,70 @@ And one subscriber:
### Run Node message publisher with Dapr
1. Open a new terminal window and navigate to `checkout` directory:
```bash
cd checkout
```
2. Install dependencies:
1. Install dependencies:
<!-- STEP
name: Install Node dependencies
working_dir: ./checkout
-->
```bash
cd pub_sub/javascript/http/checkout
npm install
```
3. Run the Node publisher app with Dapr:
<!-- END_STEP -->
2. Run the Node publisher app with Dapr:
<!-- STEP
name: Run Node publisher
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Received message "Message on A" on topic "A"'
- '== APP == Received message "Message on C" on topic "C"'
- "Exited Dapr successfully"
- '== APP == Published data: {"orderId":2}'
- '== APP == Published data: {"orderId":3}'
- "Exited App successfully"
- "Exited Dapr successfully"
expected_stderr_lines:
output_match_mode: substring
working_dir: ./checkout
output_match_mode: substring
background: true
sleep: 10
-->
```bash
npm start:dapr
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
```
<!-- END_STEP -->
### Run Node message subscriber with Dapr
1. Open a new terminal window and navigate to `order-processor` directory:
```bash
cd order-processor
```
2. Install dependencies:
1. Install dependencies:
<!-- STEP
name: Install Node dependencies
working_dir: ./order-processor
-->
```bash
cd pub_sub/javascript/http/order-processor
npm install
```
3. Run the Node subscriber app with Dapr:
<!-- END_STEP -->
2. Run the Node publisher app with Dapr:
<!-- STEP
name: Run Node subscriber
name: Run Node publisher
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Received message "Message on A" on topic "A"'
- '== APP == Received message "Message on C" on topic "C"'
- '== APP == Subscriber received: {"orderId":6}'
- "Exited Dapr successfully"
- "Exited App successfully"
expected_stderr_lines:
output_match_mode: substring
working_dir: ./order-processor
output_match_mode: substring
background: true
sleep: 10
-->
```bash
npm start:dapr
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
```
<!-- END_STEP -->

View File

@ -16,84 +16,68 @@ And one subscriber:
### Run Node message publisher with Dapr
1. Open a new terminal window and navigate to `checkout` directory:
```bash
cd checkout
```
2. Install dependencies:
1. Install dependencies:
<!-- STEP
name: Install Node dependencies
working_dir: ./checkout
-->
```bash
cd pub_sub/javascript/sdk/checkout
npm install
```
<!-- END_STEP -->
3. Run the Node publisher app with Dapr:
<!-- STEP
name: Run Node publisher
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Received message "Message on A" on topic "A"'
- '== APP == Received message "Message on C" on topic "C"'
- "Exited Dapr successfully"
- '== APP == Published data: {"orderId":2}'
- '== APP == Published data: {"orderId":3}'
- "Exited App successfully"
- "Exited Dapr successfully"
expected_stderr_lines:
output_match_mode: substring
working_dir: ./checkout
background: true
sleep: 10
-->
```bash
npm start:dapr
dapr run --app-id checkout --components-path pub_sub/components/ --app-port 5001 -- node pub_sub/javascript/sdk/checkout/
```
<!-- END_STEP -->
### Run Node message subscriber with Dapr
1. Open a new terminal window and navigate to `checkout` directory:
```bash
cd order-processor
```
2. Install dependencies:
1. Install dependencies:
<!-- STEP
name: Install Node dependencies
working_dir: ./order-processor
-->
```bash
cd pub_sub/javascript/sdk/order-processor
npm install
```
3. Run the Node subscriber app with Dapr:
<!-- END_STEP -->
3. Run the Node publisher app with Dapr:
<!-- STEP
name: Run Node subscriber
name: Run Node publisher
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Received message "Message on A" on topic "A"'
- '== APP == Received message "Message on C" on topic "C"'
- '== APP == Subscriber received: {"orderId":6}'
- "Exited Dapr successfully"
- "Exited App successfully"
expected_stderr_lines:
output_match_mode: substring
working_dir: ./order-processor
background: true
sleep: 10
-->
```bash
npm start:dapr
dapr run --app-id checkout --components-path pub_sub/components/ --app-port 5001 -- node pub_sub/javascript/sdk/order-processor/
```
<!-- END_STEP -->