mirror of https://github.com/dapr/quickstarts.git
Removed the extra space in expected test result (#689)
* Removed the extra space in expected test result Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com> * Changed the output match from exact to substring to fix the issue. Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com> * Replaced the logger.LogInformation with Console.WriteLine to fix the test issue. Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com> * Fixed the whitespace issue and added sleep directive Signed-off-by: Arash Rohani <Arash.Rohani@gmail.com>
This commit is contained in:
parent
24deefe407
commit
426af20d0f
|
@ -167,9 +167,9 @@ dotnet build
|
||||||
name: Run csharp subscriber
|
name: Run csharp subscriber
|
||||||
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 == A: Message on A'
|
- '== APP == A: Message on A'
|
||||||
- '== APP == B: Message on B'
|
- '== APP == B: Message on B'
|
||||||
- '== APP == C: Message on C'
|
- '== APP == C: Message on C'
|
||||||
- "Exited Dapr successfully"
|
- "Exited Dapr successfully"
|
||||||
- "Exited App successfully"
|
- "Exited App successfully"
|
||||||
expected_stderr_lines:
|
expected_stderr_lines:
|
||||||
|
@ -503,9 +503,12 @@ kubectl logs --selector app=python-subscriber -c python-subscriber
|
||||||
<!-- STEP
|
<!-- STEP
|
||||||
name: Deploy Csharp App
|
name: Deploy Csharp App
|
||||||
expected_stdout_lines:
|
expected_stdout_lines:
|
||||||
- "A: Message on A"
|
- "A: Message on A"
|
||||||
- "B: Message on B"
|
- "B: Message on B"
|
||||||
- "C: Message on C"
|
- "C: Message on C"
|
||||||
|
expected_stderr_lines:
|
||||||
|
output_match_mode: substring
|
||||||
|
sleep: 5
|
||||||
-->
|
-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -10,17 +10,17 @@ app.UseCloudEvents();
|
||||||
app.MapSubscribeHandler();
|
app.MapSubscribeHandler();
|
||||||
|
|
||||||
app.MapPost("/A", [Topic("pubsub", "A")] (ILogger<Program> logger, MessageEvent item) => {
|
app.MapPost("/A", [Topic("pubsub", "A")] (ILogger<Program> logger, MessageEvent item) => {
|
||||||
logger.LogInformation($"{item.MessageType}: {item.Message}");
|
Console.WriteLine($"{item.MessageType}: {item.Message}");
|
||||||
return Results.Ok();
|
return Results.Ok();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapPost("/B", [Topic("pubsub", "B")] (ILogger<Program> logger, MessageEvent item) => {
|
app.MapPost("/B", [Topic("pubsub", "B")] (ILogger<Program> logger, MessageEvent item) => {
|
||||||
logger.LogInformation($"{item.MessageType}: {item.Message}");
|
Console.WriteLine($"{item.MessageType}: {item.Message}");
|
||||||
return Results.Ok();
|
return Results.Ok();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapPost("/C", [Topic("pubsub", "C")] (ILogger<Program> logger, Dictionary<string, string> item) => {
|
app.MapPost("/C", [Topic("pubsub", "C")] (ILogger<Program> logger, Dictionary<string, string> item) => {
|
||||||
logger.LogInformation($"{item["messageType"]}: {item["message"]}");
|
Console.WriteLine($"{item["messageType"]}: {item["message"]}");
|
||||||
return Results.Ok();
|
return Results.Ok();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue