MCPcopy Create free account
hub / github.com/SignTools/SignTools / TestAuthenticationWrong

Function TestAuthenticationWrong

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

Source from the content-addressed store, hash-verified

255}
256
257func TestAuthenticationWrong(t *testing.T) {
258 req, err := http.NewRequest("GET", config.Current.ServerUrl+"/jobs", nil)
259 assert.NoError(t, err)
260 req.Header.Set("Authorization", "Bearer 1234")
261 resp, err := http.DefaultClient.Do(req)
262 assert.NoError(t, err)
263 assert.Equal(t, resp.StatusCode, 401)
264}
265
266func uploadUnsigned(t *testing.T) {
267 fileId := tusUpload(t, []byte(unsignedData))

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.80

Tested by

no test coverage detected