forked from k1LoW/runn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grpc.yml
80 lines (80 loc) · 2.44 KB
/
grpc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
desc: Test using gRPC
runners:
greq: grpc://grpc.example.com:443
steps:
unary:
desc: Request using Unary RPC
greq:
grpctest.GrpcTestService/Hello:
headers:
authentication: tokenhello
message:
name: alice
num: 3
request_time: 2022-06-25T05:24:43.861872Z
test: |
steps.unary.res.status == 0 && steps.unary.res.message.message == 'hello'
error_message:
desc: Get gRPC error message
greq:
grpctest.GrpcTestService/Hello:
headers:
error: 'error'
message:
name: alice
num: 3
request_time: 2022-06-25T05:24:43.861872Z
test: |
current.res.status == 1 && current.res.message == 'request canceled'
server_streaming:
desc: Request using Server streaming RPC
greq:
grpctest.GrpcTestService/ListHello:
headers:
authentication: tokenlisthello
message:
name: bob
num: 4
request_time: 2022-06-25T05:24:43.861872Z
test: |
steps.server_streaming.res.status == 0 && len(steps.server_streaming.res.messages) == 2 && steps.server_streaming.res.messages[1].num == 34
client_streaming:
desc: Request using Client streaming RPC
greq:
grpctest.GrpcTestService/MultiHello:
headers:
authentication: tokenmultihello
messages:
-
name: alice
num: 5
request_time: 2022-06-25T05:24:43.861872Z
-
name: bob
num: 6
request_time: 2022-06-25T05:24:43.861872Z
test: |
steps.client_streaming.res.status == 0 && steps.client_streaming.res.message.num == 35
bidirectional_streaming:
desc: Request using Bidirectional streaming RPC
greq:
grpctest.GrpcTestService/HelloChat:
headers:
authentication: tokenhellochat
messages:
-
name: alice
num: 7
request_time: 2022-06-25T05:24:43.861872Z
- receive # receive server message
-
name: bob
num: 8
request_time: 2022-06-25T05:24:43.861872Z
-
name: charlie
num: 9
request_time: 2022-06-25T05:24:43.861872Z
- close # close connection
test: |
steps.bidirectional_streaming.res.status == 0 && steps.bidirectional_streaming.res.message.num == 34 && len(steps.bidirectional_streaming.res.messages) == 1