From 3cc0783d9c4e52d6e40eb82aca66e1f717ddd11f Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 30 Dec 2016 23:30:35 +0100 Subject: [PATCH] fix test break --- transport/internet/tls/config.go | 2 +- transport/internet/websocket/ws_test.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/transport/internet/tls/config.go b/transport/internet/tls/config.go index e29c350c6..e7f0e0ca2 100644 --- a/transport/internet/tls/config.go +++ b/transport/internet/tls/config.go @@ -26,7 +26,7 @@ func (v *Config) BuildCertificates() []tls.Certificate { func (v *Config) GetTLSConfig() *tls.Config { config := &tls.Config{ ClientSessionCache: globalSessionCache, - NextProtos: []string{"http/2", "spdy/3"}, + //NextProtos: []string{"http/2.0", "spdy/3", "http/1.1"}, } if v == nil { return config diff --git a/transport/internet/websocket/ws_test.go b/transport/internet/websocket/ws_test.go index be9414107..71a044a98 100644 --- a/transport/internet/websocket/ws_test.go +++ b/transport/internet/websocket/ws_test.go @@ -2,6 +2,8 @@ package websocket_test import ( "io/ioutil" + "os" + "path/filepath" "testing" "time" @@ -100,8 +102,8 @@ func Test_listenWSAndDial_TLS(t *testing.T) { AllowInsecure: true, Certificate: []*v2tls.Certificate{ { - Certificate: ReadFile("./../../../testing/tls/cert.pem", assert), - Key: ReadFile("./../../../testing/tls/key.pem", assert), + Certificate: ReadFile(filepath.Join(os.Getenv("GOPATH"), "src", "v2ray.com", "core", "testing", "tls", "cert.pem"), assert), + Key: ReadFile(filepath.Join(os.Getenv("GOPATH"), "src", "v2ray.com", "core", "testing", "tls", "key.pem"), assert), }, }, }