-
Notifications
You must be signed in to change notification settings - Fork 1
/
jarm.hurl
41 lines (30 loc) · 834 Bytes
/
jarm.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
# Request with host and port
GET {{host}}/jarm?host=google.com&port=443
HTTP 200
Content-Type: application/json
# Use default https port
GET {{host}}/jarm?host=google.com
HTTP 200
Content-Type: application/json
# Host is extracted from Url
GET {{host}}/jarm?host=https://google.com
HTTP 200
Content-Type: application/json
[Asserts]
jsonpath "$.host" == "google.com"
# NGINX correctly redirect API calls
GET {{nginx_host}}/api/v1/jarm?host=google.com
HTTP 200
Content-Type: application/json
# Error validation test
GET {{host}}/jarm?host=google.com&port=wow
HTTP 200
Content-Type: application/json
[Asserts]
jsonpath "$.error.error_type" == "Dns resolve error"
# Host is known to not respond
GET {{host}}/jarm?host=163.com
HTTP 200
Content-Type: application/json
[Asserts]
jsonpath "$.error.error_type" == "Connection error"