add support for the multiconnect interop test case

This commit is contained in:
Marten Seemann
2020-01-15 09:46:29 +07:00
parent fb9315c4f1
commit 8aaa11687d
2 changed files with 16 additions and 1 deletions

View File

@@ -62,6 +62,8 @@ func runTestcase(testcase string) error {
defer r.Close()
return downloadFiles(r, urls)
case "handshake", "transfer", "retry":
case "multiconnect":
return runMultiConnectTest(urls)
case "versionnegotiation":
return runVersionNegotiationTest(urls)
case "resumption":
@@ -90,6 +92,19 @@ func runVersionNegotiationTest(urls []string) error {
return nil
}
func runMultiConnectTest(urls []string) error {
for _, url := range urls {
r := &http09.RoundTripper{TLSClientConfig: tlsConf}
if err := downloadFile(r, url); err != nil {
return err
}
if err := r.Close(); err != nil {
return err
}
}
return nil
}
func runResumptionTest(urls []string) error {
if len(urls) < 2 {
return errors.New("expected at least 2 URLs")