-
Notifications
You must be signed in to change notification settings - Fork 67
/
grpc-trigger-embedded-protobuf-with-comment.yaml
60 lines (53 loc) 路 1.69 KB
/
grpc-trigger-embedded-protobuf-with-comment.yaml
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
type: Test
spec:
id: create-pokemon-embedded
name: "Create Pokemon"
description: Create a single pokemon on Pokeshop
trigger:
type: grpc
grpc:
protobufFile: |
// This is a comment
syntax = "proto3";
option java_multiple_files = true;
option java_outer_classname = "PokeshopProto";
option objc_class_prefix = "PKS";
package pokeshop;
service Pokeshop {
rpc getPokemonList (GetPokemonRequest) returns (GetPokemonListResponse) {}
rpc createPokemon (Pokemon) returns (Pokemon) {}
rpc importPokemon (ImportPokemonRequest) returns (ImportPokemonRequest) {}
}
message ImportPokemonRequest {
int32 id = 1;
optional bool isFixed = 2;
}
message GetPokemonRequest {
optional int32 skip = 1;
optional int32 take = 2;
optional bool isFixed = 3;
}
message GetPokemonListResponse {
repeated Pokemon items = 1;
int32 totalCount = 2;
}
message Pokemon {
optional int32 id = 1;
string name = 2;
string type = 3;
bool isFeatured = 4;
optional string imageUrl = 5;
}
address: demo-rpc:8082
method: pokeshop.Pokeshop.createPokemon
request: |-
{
"name": "Pikachu",
"type": "eletric",
"isFeatured": true
}
specs:
- name: It calls Pokeshop correctly
selector: span[tracetest.span.type="rpc" name="pokeshop.Pokeshop/createPokemon" rpc.system="grpc" rpc.method="createPokemon" rpc.service="pokeshop.Pokeshop"]
assertions:
- attr:rpc.grpc.status_code = 0