MCPcopy Index your code
hub / github.com/SignTools/SignTools / uploadUnsigned

Function uploadUnsigned

main_test.go:266–282  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

264}
265
266func uploadUnsigned(t *testing.T) {
267 fileId := tusUpload(t, []byte(unsignedData))
268 form := url.Values{
269 formNames.FormFileId: {fileId},
270 formNames.FormProfileId: {profileId},
271 formNames.FormAllDevices: {"true"},
272 formNames.FormAppDebug: {"true"},
273 formNames.FormFileShare: {"true"},
274 formNames.FormBuilderId: {"selfhosted"},
275 }
276 req, err := http.NewRequest("POST", config.Current.ServerUrl+"/apps", strings.NewReader(form.Encode()))
277 assert.NoError(t, err)
278 req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
279 resp, err := http.DefaultClient.Do(req)
280 assert.NoError(t, err)
281 assert.NoError(t, util.Check2xxCode(resp.StatusCode))
282}
283
284func TestEscapeXML(t *testing.T) {
285 escapedText, err := escapeXML("This & That")

Callers 1

TestIntegrationFunction · 0.85

Calls 2

Check2xxCodeFunction · 0.92
tusUploadFunction · 0.85

Tested by

no test coverage detected