(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestCustomHeaderFlag(t *testing.T) { |
| 35 | t.Parallel() |
| 36 | |
| 37 | headers := http.Header{} |
| 38 | var headerErr error |
| 39 | flag := newCustomHeaderFlag(&headers, &headerErr) |
| 40 | |
| 41 | require.NoError(t, flag.Set("Cookie: CF_Authorization=token")) |
| 42 | require.NoError(t, flag.Set("X-Request-Id: run-123")) |
| 43 | require.NoError(t, headerErr) |
| 44 | require.Equal(t, "CF_Authorization=token", headers.Get("Cookie")) |
| 45 | require.Equal(t, "run-123", headers.Get("X-Request-Id")) |
| 46 | } |
| 47 | |
| 48 | func TestCustomHeaderFlagRejectsInvalidHeaders(t *testing.T) { |
| 49 | t.Parallel() |
nothing calls this directly
no test coverage detected