mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-19 07:38:57 +08:00
Update gin_integration_test.go
squash you dang spaces!!!
This commit is contained in:
parent
c0c030b741
commit
b1d2093f55
@ -151,8 +151,8 @@ func TestUnixSocket(t *testing.T) {
|
|||||||
defer os.Remove(unixTestSocket)
|
defer os.Remove(unixTestSocket)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
router.GET("/example", func(c *Context) { c.String(http.StatusOK, "it worked") })
|
router.GET("/example", func(c *Context) { c.String(http.StatusOK, "it worked") })
|
||||||
assert.NoError(t, router.RunUnix(unixTestSocket))
|
assert.NoError(t, router.RunUnix(unixTestSocket))
|
||||||
}()
|
}()
|
||||||
// have to wait for the goroutine to start and run the server
|
// have to wait for the goroutine to start and run the server
|
||||||
// otherwise the main thread will complete
|
// otherwise the main thread will complete
|
||||||
@ -165,7 +165,7 @@ func TestUnixSocket(t *testing.T) {
|
|||||||
scanner := bufio.NewScanner(c)
|
scanner := bufio.NewScanner(c)
|
||||||
var response string
|
var response string
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
response += scanner.Text()
|
response += scanner.Text()
|
||||||
}
|
}
|
||||||
assert.Contains(t, response, "HTTP/1.0 200", "should get a 200")
|
assert.Contains(t, response, "HTTP/1.0 200", "should get a 200")
|
||||||
assert.Contains(t, response, "it worked", "resp body should match")
|
assert.Contains(t, response, "it worked", "resp body should match")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user