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

View File

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