Skip to content

Commit a0e10c0

Browse files
gewenyu99gitbook-bot
authored andcommitted
GITBOOK-724: Re-expand Test Framework Docs
1 parent 0695923 commit a0e10c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1716
-435
lines changed

.gitbook/assets/openapi (1).json

+391
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,391 @@
1+
{
2+
"openapi": "3.1.0",
3+
"servers": [
4+
{
5+
"url": "https://api.trunk.io/v1"
6+
}
7+
],
8+
"info": {
9+
"title": "Trunk APIs",
10+
"version": "1.0.0",
11+
"license": {
12+
"name": "UNLICENSED"
13+
}
14+
},
15+
"paths": {
16+
"/flaky-tests/list-quarantined-tests": {
17+
"post": {
18+
"security": [
19+
{
20+
"ApiKeyAuth": []
21+
}
22+
],
23+
"summary": "Get a list of quarantined tests",
24+
"requestBody": {
25+
"content": {
26+
"application/json": {
27+
"schema": {
28+
"type": "object",
29+
"properties": {
30+
"repo": {
31+
"type": "object",
32+
"properties": {
33+
"host": {
34+
"type": "string",
35+
"description": "The host of the repository. For example, `github.com` or `gitlab.com`. If self-hosting, this will be the hostname of your instance.",
36+
"examples": [
37+
"github.com",
38+
"gitlab.com",
39+
"github-enterprise.my-org-tld.com",
40+
"gitlab-enterprise.my-org-tld.com"
41+
]
42+
},
43+
"owner": {
44+
"type": "string",
45+
"description": "The owner of the repository. For example, `my-github-org` or `my-gitlab-org/my/sub/group`.",
46+
"examples": [
47+
"my-github-org",
48+
"my-gitlab-org/my/sub/group"
49+
]
50+
},
51+
"name": {
52+
"type": "string",
53+
"description": "The name of the repository.",
54+
"examples": [
55+
"my-repo"
56+
]
57+
}
58+
},
59+
"required": [
60+
"host",
61+
"owner",
62+
"name"
63+
],
64+
"description": "The repository to list quarantined tests for."
65+
},
66+
"orgUrlSlug": {
67+
"type": "string",
68+
"description": "The slug of your organization. Find this at https://app.trunk.io/trunk/settings under \"Organization Name\" > \"Slug\"",
69+
"examples": [
70+
"my-trunk-org-slug"
71+
]
72+
},
73+
"pageQuery": {
74+
"type": "object",
75+
"properties": {
76+
"pageSize": {
77+
"type": "integer",
78+
"minimum": 1,
79+
"maximum": 100,
80+
"description": "The number of tests to return per page."
81+
},
82+
"pageToken": {
83+
"type": "string",
84+
"description": "The page token to use for pagination. This is returned from the previous call to this endpoint. For the first page, this should be empty.",
85+
"examples": [
86+
""
87+
]
88+
}
89+
},
90+
"required": [
91+
"pageSize"
92+
],
93+
"description": "Pagination options for the list of quarantined tests."
94+
}
95+
},
96+
"required": [
97+
"repo",
98+
"orgUrlSlug",
99+
"pageQuery"
100+
]
101+
}
102+
}
103+
}
104+
},
105+
"responses": {
106+
"200": {
107+
"description": "OK",
108+
"content": {
109+
"application/json": {
110+
"schema": {
111+
"type": "object",
112+
"properties": {
113+
"quarantined_tests": {
114+
"type": "array",
115+
"items": {
116+
"type": "object",
117+
"properties": {
118+
"name": {
119+
"type": "string",
120+
"description": "The name of the test case."
121+
},
122+
"parent": {
123+
"type": [
124+
"string",
125+
"null"
126+
],
127+
"description": "The parent of the test case."
128+
},
129+
"file": {
130+
"type": [
131+
"string",
132+
"null"
133+
],
134+
"description": "The file of the test case."
135+
},
136+
"class_name": {
137+
"type": [
138+
"string",
139+
"null"
140+
],
141+
"description": "The class name of the test case."
142+
},
143+
"status": {
144+
"type": "string",
145+
"enum": [
146+
"HEALTHY",
147+
"FLAKY",
148+
"BROKEN"
149+
],
150+
"description": "The status of the test case."
151+
},
152+
"code_owners": {
153+
"type": "array",
154+
"items": {
155+
"type": "string"
156+
},
157+
"description": "The latest codeowners of the test case."
158+
},
159+
"quarantine_setting": {
160+
"type": "string",
161+
"enum": [
162+
"ALWAYS_QUARANTINE",
163+
"AUTO_QUARANTINE"
164+
],
165+
"description": "The quarantine setting of the test case."
166+
},
167+
"status_last_updated_at": {
168+
"type": "string",
169+
"format": "date-time",
170+
"description": "The last time the status of the test case was updated."
171+
}
172+
},
173+
"required": [
174+
"name",
175+
"parent",
176+
"file",
177+
"class_name",
178+
"status",
179+
"code_owners",
180+
"quarantine_setting",
181+
"status_last_updated_at"
182+
],
183+
"description": "A quarantined test case."
184+
},
185+
"description": "A page of quarantined test cases."
186+
},
187+
"page": {
188+
"type": "object",
189+
"properties": {
190+
"total_rows": {
191+
"type": "integer",
192+
"exclusiveMinimum": 0,
193+
"description": "The total number of quarantined test cases in the paginated list."
194+
},
195+
"total_pages": {
196+
"type": "integer",
197+
"exclusiveMinimum": 0,
198+
"description": "The total number of pages in the paginated list of quarantined test cases."
199+
},
200+
"next_page_token": {
201+
"type": "string",
202+
"description": "The next page token to use for pagination. See `pageToken` in the request for more information."
203+
},
204+
"prev_page_token": {
205+
"type": "string",
206+
"description": "The previous page token to use for pagination. See `pageToken` in the request for more information."
207+
},
208+
"last_page_token": {
209+
"type": "string",
210+
"description": "The last page token to use for pagination. See `pageToken` in the request for more information."
211+
},
212+
"page_index": {
213+
"type": "integer",
214+
"exclusiveMinimum": 0,
215+
"description": "The index of the current page in the paginated list of quarantined test cases."
216+
}
217+
},
218+
"required": [
219+
"total_rows",
220+
"total_pages",
221+
"next_page_token",
222+
"prev_page_token",
223+
"last_page_token",
224+
"page_index"
225+
],
226+
"description": "Pagination information for the list of quarantined test cases."
227+
}
228+
},
229+
"required": [
230+
"quarantined_tests",
231+
"page"
232+
]
233+
}
234+
}
235+
}
236+
},
237+
"401": {
238+
"description": "Unauthorized",
239+
"content": {
240+
"application/plain-text": {
241+
"schema": {
242+
"type": "string"
243+
}
244+
}
245+
}
246+
}
247+
}
248+
}
249+
},
250+
"/status": {
251+
"get": {
252+
"security": [],
253+
"summary": "Get the status of Trunk services",
254+
"responses": {
255+
"200": {
256+
"description": "OK",
257+
"content": {
258+
"application/json": {
259+
"schema": {
260+
"type": "object",
261+
"properties": {
262+
"overallStatus": {
263+
"oneOf": [
264+
{
265+
"type": "object",
266+
"properties": {
267+
"type": {
268+
"type": "string",
269+
"const": "up"
270+
},
271+
"color": {
272+
"type": "string",
273+
"enum": [
274+
"green"
275+
]
276+
},
277+
"overallStatusDescription": {
278+
"type": "string",
279+
"const": "All systems operational"
280+
}
281+
},
282+
"required": [
283+
"type",
284+
"color",
285+
"overallStatusDescription"
286+
]
287+
},
288+
{
289+
"type": "object",
290+
"properties": {
291+
"type": {
292+
"type": "string",
293+
"const": "impacted"
294+
},
295+
"color": {
296+
"type": "string",
297+
"enum": [
298+
"yellow",
299+
"red"
300+
]
301+
},
302+
"overallStatusDescription": {
303+
"type": "string",
304+
"const": "Impacted"
305+
},
306+
"impactedStatuses": {
307+
"type": "array",
308+
"items": {
309+
"type": "object",
310+
"properties": {
311+
"name": {
312+
"type": "string"
313+
},
314+
"color": {
315+
"type": "string",
316+
"enum": [
317+
"yellow",
318+
"red"
319+
]
320+
},
321+
"statusDescription": {
322+
"type": "string"
323+
}
324+
},
325+
"required": [
326+
"name",
327+
"color",
328+
"statusDescription"
329+
]
330+
}
331+
}
332+
},
333+
"required": [
334+
"type",
335+
"color",
336+
"overallStatusDescription",
337+
"impactedStatuses"
338+
]
339+
}
340+
]
341+
},
342+
"statuses": {
343+
"type": "array",
344+
"items": {
345+
"type": "object",
346+
"properties": {
347+
"name": {
348+
"type": "string"
349+
},
350+
"color": {
351+
"type": "string",
352+
"enum": [
353+
"green",
354+
"yellow",
355+
"red"
356+
]
357+
},
358+
"statusDescription": {
359+
"type": "string"
360+
}
361+
},
362+
"required": [
363+
"name",
364+
"color",
365+
"statusDescription"
366+
]
367+
}
368+
}
369+
},
370+
"required": [
371+
"overallStatus",
372+
"statuses"
373+
]
374+
}
375+
}
376+
}
377+
}
378+
}
379+
}
380+
}
381+
},
382+
"components": {
383+
"securitySchemes": {
384+
"ApiKeyAuth": {
385+
"type": "apiKey",
386+
"in": "header",
387+
"name": "x-api-token"
388+
}
389+
}
390+
}
391+
}

0 commit comments

Comments
 (0)