Skip to content

Commit d579e54

Browse files
authored
Update README.md
1 parent 1f3f72a commit d579e54

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ytest/README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,22 @@ match { // assert resp.body.id == id
136136

137137
## host
138138

139-
TODO
139+
```go
140+
host <host> <real>
141+
```
142+
143+
The Host directive allows you to use an abstract domain name (which does not necessarily exist) to represent a service. For examples:
144+
145+
```go
146+
host "https://foo.com", "http://127.0.0.1:8080"
147+
```
148+
149+
The host directive makes it easy for you to use the same test code between your test environment and production environment:
140150

151+
```go
152+
host "https://foo.com", ${FOO_HOST}
153+
// Let env FOO_HOST point to the test environment or production environment
154+
```
141155

142156
## auth
143157

0 commit comments

Comments
 (0)