(t *testing.T, e env)
| 4385 | } |
| 4386 | |
| 4387 | func testStreamClientInterceptor(t *testing.T, e env) { |
| 4388 | te := newTest(t, e) |
| 4389 | te.streamClientInt = failOkayStream |
| 4390 | te.startServer(&testServer{security: e.security}) |
| 4391 | defer te.tearDown() |
| 4392 | |
| 4393 | tc := testgrpc.NewTestServiceClient(te.clientConn()) |
| 4394 | respParam := []*testpb.ResponseParameters{ |
| 4395 | { |
| 4396 | Size: int32(1), |
| 4397 | }, |
| 4398 | } |
| 4399 | payload, err := newPayload(testpb.PayloadType_COMPRESSABLE, int32(1)) |
| 4400 | if err != nil { |
| 4401 | t.Fatal(err) |
| 4402 | } |
| 4403 | req := &testpb.StreamingOutputCallRequest{ |
| 4404 | ResponseType: testpb.PayloadType_COMPRESSABLE, |
| 4405 | ResponseParameters: respParam, |
| 4406 | Payload: payload, |
| 4407 | } |
| 4408 | ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) |
| 4409 | defer cancel() |
| 4410 | if _, err := tc.StreamingOutputCall(ctx, req); status.Code(err) != codes.NotFound { |
| 4411 | t.Fatalf("%v.StreamingOutputCall(_) = _, %v, want _, error code %s", tc, err, codes.NotFound) |
| 4412 | } |
| 4413 | } |
| 4414 | |
| 4415 | func (s) TestUnaryServerInterceptor(t *testing.T) { |
| 4416 | for _, e := range listTestEnv() { |
no test coverage detected