Skip to content

Commit

Permalink
Updating tests for PubSub and Service invoke to Paas with multiapp run
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Yuknewicz <[email protected]>
  • Loading branch information
Paul Yuknewicz authored and Paul Yuknewicz committed Sep 22, 2023
1 parent df6db50 commit dbe603d
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 576 deletions.
35 changes: 2 additions & 33 deletions pub_sub/csharp/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ expected_stdout_lines:
- '== APP - order-processor-http == Subscriber received : 10'
expected_stderr_lines:
output_match_mode: substring
match_order: none
background: true
sleep: 15
timeout_seconds: 30
Expand Down Expand Up @@ -78,53 +79,21 @@ An alternative to running all or multiple applications at once is to run single

1. Run the Dotnet subscriber app with Dapr:

<!-- STEP
name: Run Dotnet subscriber
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Subscriber received : 2'
- "Exited Dapr successfully"
- "Exited App successfully"
expected_stderr_lines:
working_dir: ./order-processor
output_match_mode: substring
background: true
sleep: 10
-->


```bash
cd ./order-processor
dapr run --app-id order-processor-http --resources-path ../../../components/ --app-port 7005 -- dotnet run
```

<!-- END_STEP -->
### Run Dotnet message publisher with Dapr

1. Run the Dotnet publisher app with Dapr:

<!-- STEP
name: Run Dotnet publisher
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Published data: Order { OrderId = 1 }'
- '== APP == Published data: Order { OrderId = 2 }'
- "Exited App successfully"
- "Exited Dapr successfully"
expected_stderr_lines:
working_dir: ./checkout
output_match_mode: substring
background: true
sleep: 10
-->


```bash
cd ./checkout
dapr run --app-id checkout-http --resources-path ../../../components/ -- dotnet run
```

<!-- END_STEP -->

2. Stop and clean up application processes

```bash
Expand Down
36 changes: 3 additions & 33 deletions pub_sub/csharp/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ expected_stdout_lines:
- '== APP - order-processor == Subscriber received : Order { OrderId = 10 }'
expected_stderr_lines:
output_match_mode: substring
match_order: none
background: true
sleep: 15
timeout_seconds: 30
-->

```bash
Expand Down Expand Up @@ -77,53 +79,21 @@ An alternative to running all or multiple applications at once is to run single

1. Run the Dotnet subscriber app with Dapr:

<!-- STEP
name: Run Dotnet subscriber
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Subscriber received : Order { OrderId = 2 }'
- "Exited Dapr successfully"
- "Exited App successfully"
expected_stderr_lines:
working_dir: ./order-processor
output_match_mode: substring
background: true
sleep: 10
-->


```bash
cd ./order-processor
dapr run --app-id order-processor --resources-path ../../../components/ --app-port 7006 -- dotnet run
```

<!-- END_STEP -->
### Run Dotnet message publisher with Dapr

1. Run the Dotnet publisher app with Dapr:

<!-- STEP
name: Run Dotnet publisher
expected_stdout_lines:
- "You're up and running! Both Dapr and your app logs will appear here."
- '== APP == Published data: Order { OrderId = 1 }'
- '== APP == Published data: Order { OrderId = 2 }'
- "Exited App successfully"
- "Exited Dapr successfully"
expected_stderr_lines:
working_dir: ./checkout
output_match_mode: substring
background: true
sleep: 10
-->


```bash
cd ./checkout
dapr run --app-id checkout-sdk --resources-path ../../../components/ -- dotnet run
```

<!-- END_STEP -->

2. Stop and clean up application processes

```bash
Expand Down
35 changes: 5 additions & 30 deletions pub_sub/go/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ name: Run multi app run template
expected_stdout_lines:
- 'Started Dapr with app id "order-processor-http"'
- 'Started Dapr with app id "checkout-http"'
- '== APP - checkout-http == Published data: {"orderId":1}'
- '== APP - order-processor-http == Subscriber received: map[orderId:1]'
- '== APP - checkout-http == Published data: {"orderId":10}'
- '== APP - order-processor-http == Subscriber received: {"orderId":10}'
expected_stderr_lines:
output_match_mode: substring
match_order: none
background: true
sleep: 15
timeout_seconds: 30
-->

```bash
Expand Down Expand Up @@ -73,47 +75,20 @@ An alternative to running all or multiple applications at once is to run single

1. Run the Go subscriber app with Dapr in the `order-processor` folder:

<!-- STEP
name: Run Go subscriber
expected_stdout_lines:
- '== APP == Subscriber received: {"orderId":10}'
- "Exited App successfully"
expected_stderr_lines:
output_match_mode: substring
background: true
sleep: 15
-->

```bash
cd ./order-processor
dapr run --app-port 6003 --app-id order-processor --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
dapr run --app-port 6003 --app-id order-processor-http --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
```

<!-- END_STEP -->

### Run Go message publisher with Dapr

1. Run the Go publisher app with Dapr in the `checkout` folder:

<!-- STEP
name: Run Go publisher
expected_stdout_lines:
- '== APP == Published data: {"orderId":1}'
- '== APP == Published data: {"orderId":2}'
- "Exited App successfully"
expected_stderr_lines:
output_match_mode: substring
background: true
sleep: 15
-->

```bash
cd ./checkout
dapr run --app-id checkout-http --app-protocol http --dapr-http-port 3500 --resources-path ../../../components -- go run .
```

<!-- END_STEP -->

To stop:

```bash
Expand Down
28 changes: 2 additions & 26 deletions pub_sub/go/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ expected_stdout_lines:
- '== APP - order-processor == Subscriber received: map[orderId:1]'
expected_stderr_lines:
output_match_mode: substring
match_order: none
background: true
sleep: 15
timeout_seconds: 30
-->

```bash
Expand Down Expand Up @@ -73,47 +75,21 @@ An alternative to running all or multiple applications at once is to run single

1. Run the Go subscriber app with Dapr in the `order-processor` folder:

<!-- STEP
name: Run Go subscriber
expected_stdout_lines:
- '== APP == Subscriber received: map[orderId:10]'
- "Exited App successfully"
expected_stderr_lines:
output_match_mode: substring
background: true
sleep: 15
-->

```bash
cd ./order-processor
dapr run --app-port 6005 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
```

<!-- END_STEP -->

### Run Go message publisher with Dapr

1 Run the Go publisher app with Dapr in the `checkout` folder:

<!-- STEP
name: Run Go publisher
expected_stdout_lines:
- '== APP == Published data: {"orderId":1}'
- '== APP == Published data: {"orderId":2}'
- "Exited App successfully"
expected_stderr_lines:
output_match_mode: substring
background: true
sleep: 15
-->

```bash
cd ./checkout
dapr run --app-id checkout-sdk --app-protocol http --dapr-http-port 3500 --resources-path ../../../components -- go run .
```

<!-- END_STEP -->

To stop:

```bash
Expand Down
42 changes: 6 additions & 36 deletions pub_sub/java/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ name: Run multi app run template
expected_stdout_lines:
- 'Started Dapr with app id "order-processor-http"'
- 'Started Dapr with app id "checkout-http"'
- '== APP - checkout-sdk == Published data: Order { OrderId = 10 }'
- '== APP - order-processor == Subscriber received : Order { OrderId = 10 }'
- 'Published data: 10'
- 'Subscriber received: 10'
expected_stderr_lines:
output_match_mode: substring
match_order: none
background: true
sleep: 15
timeout_seconds: 30
-->

```bash
Expand Down Expand Up @@ -100,66 +102,34 @@ An alternative to running all or multiple applications at once is to run single
### Run Java message subscriber app with Dapr

1. Navigate to directory and install dependencies:
<!-- STEP
name: Install Java dependencies
-->

```bash
cd ./order-processor
mvn clean install
```
<!-- END_STEP -->

2. Run the Java subscriber app with Dapr:
<!-- STEP
name: Run Java publisher
expected_stdout_lines:
- 'Subscriber received: 2'
- "Exited App successfully"
expected_stderr_lines:
working_dir: ./order-processor
output_match_mode: substring
background: true
sleep: 10
-->

```bash
cd ./order-processor
dapr run --app-port 8080 --app-id order-processor-http --resources-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```
<!-- END_STEP -->

### Run Java message publisher app with Dapr

1. Navigate to the directory and install dependencies:

<!-- STEP
name: Install Java dependencies
-->

```bash
cd ./checkout
mvn clean install
```
<!-- END_STEP -->

2. Run the Java publisher app with Dapr:
<!-- STEP
name: Run Java publisher
expected_stdout_lines:
- 'Published data: 1'
- 'Published data: 2'
- "Exited App successfully"
expected_stderr_lines:
working_dir: ./checkout
output_match_mode: substring
background: true
sleep: 10
-->

```bash
cd ./checkout
dapr run --app-id checkout-http --resources-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
```
<!-- END_STEP -->

```bash
dapr stop --app-id checkout-http
Expand Down
2 changes: 1 addition & 1 deletion pub_sub/java/http/dapr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ common:
apps:
- appID: order-processor-http
appDirPath: ./order-processor/target/
appPort: 8081
appPort: 8080
command: ["java", "-jar", "OrderProcessingService-0.0.1-SNAPSHOT.jar"]
- appID: checkout-http
appDirPath: ./checkout/target/
Expand Down
Loading

0 comments on commit dbe603d

Please sign in to comment.