test(cache delete): replace HTTP 204 with 200 to match API behaviour

Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
Babak K. Shandiz 2025-08-28 11:06:30 +01:00
parent 02d50700b5
commit d1a404a060
No known key found for this signature in database
GPG key ID: 9472CAEFF56C742E

View file

@ -235,7 +235,8 @@ func TestDeleteRun(t *testing.T) {
httpmock.QueryMatcher("DELETE", "repos/OWNER/REPO/actions/caches", url.Values{
"key": []string{"a weird_cache+key"},
}),
httpmock.StatusStringResponse(204, ""),
// The response is a JSON object but we don't need it here.
httpmock.StatusStringResponse(200, "{}"),
)
},
tty: true,
@ -298,7 +299,8 @@ func TestDeleteRun(t *testing.T) {
"key": []string{"cache-key"},
"ref": []string{"refs/heads/main"},
}),
httpmock.StatusStringResponse(204, ""),
// The response is a JSON object but we don't need it here.
httpmock.StatusStringResponse(200, "{}"),
)
},
tty: true,
@ -313,7 +315,8 @@ func TestDeleteRun(t *testing.T) {
"key": []string{"cache-key"},
"ref": []string{"refs/heads/main"},
}),
httpmock.StatusStringResponse(204, ""),
// The response is a JSON object but we don't need it here.
httpmock.StatusStringResponse(200, "{}"),
)
},
tty: false,