aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/http2_interop
diff options
context:
space:
mode:
authorGravatar Carl Mastrangelo <notcarl@google.com>2015-11-19 10:51:48 -0800
committerGravatar Carl Mastrangelo <notcarl@google.com>2015-11-19 10:51:48 -0800
commit2dd55db4c10d32a5d7442e977fed878c3feb72c0 (patch)
tree6375c214be96f5e0dd74345edd8f0d333b9a048d /tools/http2_interop
parent6d8063261bbb4a1455572eaa28d57d9627216727 (diff)
Add framing http2 test case, enable verbose output, and properly skip tests
Diffstat (limited to 'tools/http2_interop')
-rw-r--r--tools/http2_interop/http2interop_test.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/http2_interop/http2interop_test.go b/tools/http2_interop/http2interop_test.go
index 8fd838422b..e3d366f2f2 100644
--- a/tools/http2_interop/http2interop_test.go
+++ b/tools/http2_interop/http2interop_test.go
@@ -17,7 +17,7 @@ var (
serverHost = flag.String("server_host", "", "The host to test")
serverPort = flag.Int("server_port", 443, "The port to test")
useTls = flag.Bool("use_tls", true, "Should TLS tests be run")
- testCase = flag.String("test_case", "", "What test cases to run")
+ testCase = flag.String("test_case", "", "What test cases to run (tls, framing)")
// The rest of these are unused, but present to fulfill the client interface
serverHostOverride = flag.String("server_host_override", "", "Unused")
@@ -69,6 +69,9 @@ func (ctx *HTTP2InteropCtx) Close() error {
}
func TestShortPreface(t *testing.T) {
+ if *testCase != "framing" {
+ t.SkipNow()
+ }
ctx := InteropCtx(t)
for i := 0; i < len(Preface)-1; i++ {
if err := testShortPreface(ctx, Preface[:i]+"X"); err != io.EOF {
@@ -78,6 +81,9 @@ func TestShortPreface(t *testing.T) {
}
func TestUnknownFrameType(t *testing.T) {
+ if *testCase != "framing" {
+ t.SkipNow()
+ }
ctx := InteropCtx(t)
if err := testUnknownFrameType(ctx); err != nil {
t.Fatal(err)
@@ -86,7 +92,7 @@ func TestUnknownFrameType(t *testing.T) {
func TestTLSApplicationProtocol(t *testing.T) {
if *testCase != "tls" {
- return
+ t.SkipNow()
}
ctx := InteropCtx(t)
err := testTLSApplicationProtocol(ctx)
@@ -95,7 +101,7 @@ func TestTLSApplicationProtocol(t *testing.T) {
func TestTLSMaxVersion(t *testing.T) {
if *testCase != "tls" {
- return
+ t.SkipNow()
}
ctx := InteropCtx(t)
err := testTLSMaxVersion(ctx, tls.VersionTLS11)
@@ -106,7 +112,7 @@ func TestTLSMaxVersion(t *testing.T) {
func TestTLSBadCipherSuites(t *testing.T) {
if *testCase != "tls" {
- return
+ t.SkipNow()
}
ctx := InteropCtx(t)
err := testTLSBadCipherSuites(ctx)
@@ -114,6 +120,9 @@ func TestTLSBadCipherSuites(t *testing.T) {
}
func TestClientPrefaceWithStreamId(t *testing.T) {
+ if *testCase != "framing" {
+ t.SkipNow()
+ }
ctx := InteropCtx(t)
err := testClientPrefaceWithStreamId(ctx)
matchError(t, err, "EOF")