-
Notifications
You must be signed in to change notification settings - Fork 44
/
convenient_test.proto
151 lines (127 loc) · 2.98 KB
/
convenient_test.proto
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
syntax = "proto3";
service ConvenientTestManager {
rpc Report (ReportCollection) returns (Empty);
rpc GetWorkerCurrentRunConfig (Empty) returns (WorkerCurrentRunConfig);
}
message ReportCollection {
// use "repeated" + single-field, thus can concat multiple ReportCollection together
repeated ReportItem items = 1;
}
message ReportItem {
oneof sub_type {
SetUpAll set_up_all = 7;
TearDownAll tear_down_all = 8;
SuiteInfoProto suite_info_proto = 1;
LogEntry log_entry = 2;
RunnerStateChange runner_state_change = 3;
RunnerError runner_error = 4;
RunnerMessage runner_message = 5;
Snapshot snapshot = 6;
}
}
message SetUpAll {}
message TearDownAll {
ResolvedExecutionFilterProto resolved_execution_filter = 1;
}
message LogEntry {
int64 id = 1;
string test_name = 2;
repeated LogSubEntry sub_entries = 3;
}
message LogSubEntry {
int64 id = 1;
int64 time = 2;
LogSubEntryType type = 3;
string title = 4;
string message = 5;
string error = 6;
string stack_trace = 7;
}
enum LogSubEntryType {
INVALID = 0;
GENERAL_MESSAGE = 1;
TEST_START = 2;
TEST_BODY = 3;
TEST_END = 4;
ASSERT = 5;
ASSERT_FAIL = 6;
SECTION = 7;
}
// mimic test_api :: Suite
message SuiteInfoProto {
int64 group_id = 1;
repeated GroupInfoProto groups = 2;
repeated TestInfoProto tests = 3;
}
// mimic test_api :: Group
message GroupInfoProto {
int64 id = 1;
string name = 2;
int64 parent_id = 3;
repeated int64 entry_ids = 4;
}
// mimic test_api :: Test
message TestInfoProto {
int64 id = 1;
string name = 2;
int64 parent_id = 3;
}
message RunnerStateChange {
string test_name = 1;
TestEntryState state = 2;
}
message TestEntryState {
string status = 1;
string result = 2;
}
message RunnerError {
string test_name = 1;
string error = 2;
string stack_trace = 3;
}
message RunnerMessage {
string test_name = 1;
string message = 2;
}
message Snapshot {
int64 log_entry_id = 1;
string name = 2;
bytes image = 3;
}
// The config for `worker` in the current run (current hot-restart)
message WorkerCurrentRunConfig {
oneof sub_type {
InteractiveApp interactive_app = 1;
IntegrationTest integration_test = 2;
}
message InteractiveApp {}
message IntegrationTest {
bool report_suite_info = 1;
int32 default_retry_count = 3;
ExecutionFilter execution_filter = 2;
bool auto_update_golden_files = 4;
}
}
message ExecutionFilter {
string filter_name_regex = 1;
Strategy strategy = 2;
message Strategy {
oneof sub_type {
FirstMatch first_match = 1;
NextMatch next_match = 2;
AllMatch all_match = 3;
}
message FirstMatch {}
message NextMatch {
string prev_test_name = 1;
}
message AllMatch {}
}
}
// Information after `ExecutionFilter` is resolved
message ResolvedExecutionFilterProto {
repeated string allow_execute_test_names = 1;
}
// https://stackoverflow.com/questions/31768665/can-i-define-a-grpc-call-with-a-null-request-or-response
message Empty {
}