integration: Fix tests

This commit is contained in:
Tatsuhiro Tsujikawa 2016-03-25 00:56:20 +09:00
parent 79968c6374
commit 7972593586
1 changed files with 8 additions and 4 deletions

View File

@ -116,8 +116,6 @@ func newServerTesterInternal(src_args []string, t *testing.T, handler http.Handl
if frontendTLS {
scheme = "https"
args = append(args, testDir+"/server.key", testDir+"/server.crt")
} else {
args = append(args, "--frontend-no-tls")
}
backendURL, err := url.Parse(ts.URL)
@ -129,9 +127,15 @@ func newServerTesterInternal(src_args []string, t *testing.T, handler http.Handl
// "127.0.0.1,8080"
b := "-b" + strings.Replace(backendURL.Host, ":", ",", -1)
if backendTLS {
b += ";;proto=h2"
b += ";;proto=h2;tls"
}
args = append(args, fmt.Sprintf("-f127.0.0.1,%v", serverPort), b,
noTLS := "no-tls"
if frontendTLS {
noTLS = ""
}
args = append(args, fmt.Sprintf("-f127.0.0.1,%v;%v", serverPort, noTLS), b,
"--errorlog-file="+logDir+"/log.txt", "-LINFO")
authority := fmt.Sprintf("127.0.0.1:%v", serverPort)