newTestUploader builds an uploader whose requests land in reg.
(t *testing.T, reg *httpmock.Registry, host string, targetRepository int64)
| 43 | |
| 44 | // newTestUploader builds an uploader whose requests land in reg. |
| 45 | func newTestUploader(t *testing.T, reg *httpmock.Registry, host string, targetRepository int64) *Uploader { |
| 46 | t.Helper() |
| 47 | |
| 48 | uploader, err := NewUploader(&http.Client{Transport: reg}, gh.TokenTypeOAuth, host, targetRepository, "WRITE") |
| 49 | require.NoError(t, err) |
| 50 | return uploader |
| 51 | } |
| 52 | |
| 53 | type staticTokenConfig map[string]string |
| 54 |
no test coverage detected