You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
正常获取IP信息 tt.mockHttpGetFunc is nil: false
正常获取IP信息 tt.mockReadAllFunc is nil: false
ioReadAll 192.168.0.1 <nil>
http.Get错误 tt.mockHttpGetFunc is nil: false
http.Get错误 tt.mockReadAllFunc is nil: true
请求发生错误: http get error
io.ReadAll错误 tt.mockHttpGetFunc is nil: false
io.ReadAll错误 tt.mockReadAllFunc is nil: false
ioReadAll 192.168.0.1 <nil>
--- FAIL: TestGetIp (0.00s)
--- FAIL: TestGetIp/io.ReadAll错误 (0.00s)
http_request_test.go:66: GetIp() = 192.168.0.1, expect
FAIL
exit status 1
FAIL godemo/test/http_request 0.005s
--------------------------------------------------------------
正常获取IP信息 tt.mockHttpGetFunc is nil: false
正常获取IP信息 tt.mockReadAllFunc is nil: false
ioReadAll 192.168.0.1 <nil>
http.Get错误 tt.mockHttpGetFunc is nil: false
http.Get错误 tt.mockReadAllFunc is nil: true
ioReadAll 192.168.0.1 <nil>
io.ReadAll错误 tt.mockHttpGetFunc is nil: false
io.ReadAll错误 tt.mockReadAllFunc is nil: false
ioReadAll 192.168.0.1 <nil>
--- FAIL: TestGetIp (0.00s)
--- FAIL: TestGetIp/http.Get错误 (0.00s)
http_request_test.go:66: GetIp() = 192.168.0.1, expect
--- FAIL: TestGetIp/io.ReadAll错误 (0.00s)
http_request_test.go:66: GetIp() = 192.168.0.1, expect
FAIL
exit status 1
FAIL godemo/test/http_request 0.006s
result expect
正常获取IP信息 tt.mockHttpGetFunc is nil: false
正常获取IP信息 tt.mockReadAllFunc is nil: false
ioReadAll 192.168.0.1 <nil>
http.Get错误 tt.mockHttpGetFunc is nil: false
http.Get错误 tt.mockReadAllFunc is nil: true
请求发生错误: http get error
io.ReadAll错误 tt.mockHttpGetFunc is nil: false
io.ReadAll错误 tt.mockReadAllFunc is nil: false
ioReadAll read all error
读取响应数据发生错误: read all error
PASS
ok godemo/test/http_request 0.005s
The text was updated successfully, but these errors were encountered:
Behaviors:
file1: http_request.go
file2:http_request_test.go
test command
result unexpect
result expect
The text was updated successfully, but these errors were encountered: