-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtests.hurl
107 lines (93 loc) · 2 KB
/
tests.hurl
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
# WARNING: This file was not generated, but manually written.
# DON'T OVERWRITE IT
# Use it to test:
# npx hurl --test data-computer/tests.hurl
##################################################################
# v1/clustering
POST {{host}}/v1/clustering
content-type: application/x-tar
x-hook: https://webhook.site/69300b22-a251-4c16-9905-f7ba218ae7e9
[Options]
skip: {{blocked}}
file,example.tar.gz;
HTTP 200
# Capture the computing token
[Captures]
computing_token: jsonpath "$[0].value"
[Asserts]
variable "computing_token" exists
POST {{host}}/v1/retrieve-json
content-type: application/json
[Options]
delay: 90000
skip: {{blocked}}
```
[
{
"value":"{{computing_token}}"
}
]
```
HTTP 200
Content-Type: application/json
[Asserts]
jsonpath "$" count == 49
jsonpath "$[*].value.cluster" exists
##################################################################
# v1/noise
POST {{host}}/v1/noise
content-type: application/x-tar
x-hook: https://webhook.site/69300b22-a251-4c16-9905-f7ba218ae7e9
file,example.tar.gz;
HTTP 200
# Capture the computing token
[Captures]
computing_token: jsonpath "$[0].value"
[Asserts]
variable "computing_token" exists
POST {{host}}/v1/retrieve-json
content-type: application/json
[Options]
delay: 90000
```
[
{
"value":"{{computing_token}}"
}
]
```
HTTP 200
Content-Type: application/json
[Asserts]
jsonpath "$" count > 0
jsonpath "$" count < 50
##################################################################
# v1/noise-lodex
POST {{host}}/v1/noise-lodex
content-type: application/x-tar
x-hook: https://webhook.site/69300b22-a251-4c16-9905-f7ba218ae7e9
file,example.tar.gz;
HTTP 200
# Capture the computing token
[Captures]
computing_token: jsonpath "$[0].value"
[Asserts]
variable "computing_token" exists
POST {{host}}/v1/retrieve-json
content-type: application/json
[Options]
delay: 90000
```
[
{
"value":"{{computing_token}}"
}
]
```
HTTP 200
Content-Type: application/json
[Asserts]
jsonpath "$" count > 0
jsonpath "$" count < 50
jsonpath "$[*].id" exists
jsonpath "$[*].value" exists