-
Notifications
You must be signed in to change notification settings - Fork 1
/
integration.imcs
35 lines (28 loc) · 1.97 KB
/
integration.imcs
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
# HTTP GET /index.html
http.GET("https://stackoverflow.com/index.html") => Status(200) -> Header("Content-Type", "text/html") -> Contains(`<title>INetSim default HTML page</title>`)
http2.GET("https://stackoverflow.com/index.html") => Status(200) -> Header("Content-Type", "text/html") -> Contains(`<title>INetSim default HTML page</title>`)
# HTTP GET default ico
http.GET("https://google.com/favicon.ico") => Status(200) -> SHA256("cb3f33cb0c7bae881d13be647cb928aa7fec9e9fcd6ec758751374bf7436d41a")
http2.GET("https://google.com/favicon.ico") => Status(200) -> SHA256("cb3f33cb0c7bae881d13be647cb928aa7fec9e9fcd6ec758751374bf7436d41a")
# HTTP POST - Status 204
http.POST("https://api.icndb.com/jokes/new", `{"joke":"asdf","categories":[]}`) => Status(204)
http2.POST("https://api.icndb.com/jokes/new", `{"joke":"asdf","categories":[]}`) => Status(204)
# HTTP PUT - Status 204
http.PUT("https://api.icndb.com/jokes/37", `{"joke":"asdf","categories":[]}`) => Status(204)
http2.PUT("https://api.icndb.com/jokes/37", `{"joke":"asdf","categories":[]}`) => Status(204)
# Ensure that the Google DNS fake works
dns.A("mail.google.com") => NotEmpty() -> ResolvedIP(1.1.1.1)
doh.A("mail.google.com") => NotEmpty() -> ResolvedIP(1.1.1.1)
doh2.A("mail.google.com") => NotEmpty() -> ResolvedIP(1.1.1.1)
# Ensure the Google reverse entry is in the cache
dns.PTR(1.1.1.1) => NotEmpty() -> ResolvedHost("mail.google.com")
doh.PTR(1.1.1.1) => NotEmpty() -> ResolvedHost("mail.google.com")
doh2.PTR(1.1.1.1) => NotEmpty() -> ResolvedHost("mail.google.com")
# Ensure that the Reddit DNS fake works
dns.A("www.reddit.com") => NotEmpty() -> ResolvedIP(2.2.2.2)
doh.A("www.reddit.com") => NotEmpty() -> ResolvedIP(2.2.2.2)
doh2.A("www.reddit.com") => NotEmpty() -> ResolvedIP(2.2.2.2)
# Ensure the Reddit reverse entry is in the cache
dns.PTR(2.2.2.2) => NotEmpty() -> ResolvedHost("www.reddit.com")
doh.PTR(2.2.2.2) => NotEmpty() -> ResolvedHost("www.reddit.com")
doh2.PTR(2.2.2.2) => NotEmpty() -> ResolvedHost("www.reddit.com")