mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-21 16:56:27 -05:00
fix test break
This commit is contained in:
parent
5ec3fe093d
commit
e5fbe56e2e
@ -71,10 +71,19 @@ func TestTransportConfig(t *testing.T) {
|
||||
assert.String(header.Request.GetVersionValue()).Equals("1.1")
|
||||
assert.String(header.Request.Uri[0]).Equals("/b")
|
||||
assert.String(header.Request.Method.Value).Equals("GET")
|
||||
assert.String(header.Request.Header[0].Name).Equals("a")
|
||||
assert.String(header.Request.Header[0].Value[0]).Equals("b")
|
||||
assert.String(header.Request.Header[1].Name).Equals("c")
|
||||
assert.String(header.Request.Header[1].Value[0]).Equals("d")
|
||||
var va, vc string
|
||||
for _, h := range header.Request.Header {
|
||||
switch h.Name {
|
||||
case "a":
|
||||
va = h.Value[0]
|
||||
case "c":
|
||||
vc = h.Value[0]
|
||||
default:
|
||||
t.Error("Unknown header ", h.String())
|
||||
}
|
||||
}
|
||||
assert.String(va).Equals("b")
|
||||
assert.String(vc).Equals("d")
|
||||
assert.String(header.Response.Version.Value).Equals("1.0")
|
||||
assert.String(header.Response.Status.Code).Equals("404")
|
||||
assert.String(header.Response.Status.Reason).Equals("Not Found")
|
||||
|
Loading…
Reference in New Issue
Block a user