(ctx context.Context, _ *tap.Info)
| 307 | } |
| 308 | |
| 309 | func authHandle(ctx context.Context, _ *tap.Info) (context.Context, error) { |
| 310 | md, ok := metadata.FromIncomingContext(ctx) |
| 311 | if !ok { |
| 312 | return ctx, fmt.Errorf("didn't find metadata in context") |
| 313 | } |
| 314 | for k, vwant := range authdata { |
| 315 | vgot, ok := md[k] |
| 316 | if !ok { |
| 317 | return ctx, fmt.Errorf("didn't find authdata key %v in context", k) |
| 318 | } |
| 319 | if vgot[0] != vwant { |
| 320 | return ctx, fmt.Errorf("for key %v, got value %v, want %v", k, vgot, vwant) |
| 321 | } |
| 322 | } |
| 323 | return ctx, nil |
| 324 | } |
| 325 | |
| 326 | func (s) TestPerRPCCredentialsViaDialOptions(t *testing.T) { |
| 327 | for _, e := range listTestEnv() { |
nothing calls this directly
no test coverage detected