Skip to content

Commit

Permalink
update http header test
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Dec 3, 2017
1 parent 7709ee9 commit 13ed4b8
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion transport/internet/headers/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,31 @@ func TestRequestHeader(t *testing.T) {
func TestConnection(t *testing.T) {
assert := With(t)

auth, err := NewHttpAuthenticator(context.Background(), new(Config))
auth, err := NewHttpAuthenticator(context.Background(), &Config{
Request: &RequestConfig{
Method: &Method{Value: "Post"},
Uri: []string{"/testpath"},
Header: []*Header{
{
Name: "Host",
Value: []string{"www.v2ray.com", "www.google.com"},
},
{
Name: "User-Agent",
Value: []string{"Test-Agent"},
},
},
},
Response: &ResponseConfig{
Version: &Version{
Value: "1.1",
},
Status: &Status{
Code: "404",
Reason: "Not Found",
},
},
})
assert(err, IsNil)

listener, err := net.Listen("tcp", "127.0.0.1:0")
Expand Down

0 comments on commit 13ed4b8

Please sign in to comment.