MCPcopy Create free account
hub / github.com/cli/cli / newTestUploader

Function newTestUploader

internal/attachments/client_test.go:45–51  ·  view source on GitHub ↗

newTestUploader builds an uploader whose requests land in reg.

(t *testing.T, reg *httpmock.Registry, host string, targetRepository int64)

Source from the content-addressed store, hash-verified

43
44// newTestUploader builds an uploader whose requests land in reg.
45func 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
53type staticTokenConfig map[string]string
54

Callers 4

TestUploadFunction · 0.85
TestUploadHostForTenantFunction · 0.85
TestUploadErrorsFunction · 0.85
TestUploadMissingFileFunction · 0.85

Calls 2

NewUploaderFunction · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected