(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestApplyHeadersGRPC(t *testing.T) { |
| 79 | ctx := applyHeadersGRPC(context.Background(), []string{"X-TOKEN=my-secret", "X-Custom=value"}) |
| 80 | |
| 81 | md, ok := metadata.FromOutgoingContext(ctx) |
| 82 | require.True(t, ok) |
| 83 | require.Equal(t, []string{"my-secret"}, md.Get("X-TOKEN")) |
| 84 | require.Equal(t, []string{"value"}, md.Get("X-Custom")) |
| 85 | } |
| 86 | |
| 87 | func TestApplyHeadersGRPC_lastWins(t *testing.T) { |
| 88 | ctx := applyHeadersGRPC(context.Background(), []string{"X-TOKEN=first", "X-TOKEN=second"}) |
nothing calls this directly
no test coverage detected