1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

chore(tests): add coverage for ./pkg/artifactcache (#198)

https://code.forgejo.org/forgejo/act/actions/runs/1157/jobs/0#jobstep-10-251
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/198
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
Earl Warren 2025-07-27 15:25:14 +00:00 committed by earl-warren
parent 34939ad5f4
commit 1b0c31121a

View file

@ -158,7 +158,7 @@ func TestHandler(t *testing.T) {
req.Header.Set("Content-Range", "bytes 0-99/*")
resp, err := httpClient.Do(req)
require.NoError(t, err)
assert.Equal(t, 400, resp.StatusCode)
assert.Equal(t, 404, resp.StatusCode)
})
t.Run("upload with complete", func(t *testing.T) {
@ -260,7 +260,7 @@ func TestHandler(t *testing.T) {
{
resp, err := httpClient.Post(fmt.Sprintf("%s/caches/%d", base, 100), "", nil)
require.NoError(t, err)
assert.Equal(t, 400, resp.StatusCode)
assert.Equal(t, 404, resp.StatusCode)
}
})