From d1a404a060689667fa27d1c697a8d77a7c834a49 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Thu, 28 Aug 2025 11:06:30 +0100 Subject: [PATCH] test(cache delete): replace `HTTP 204` with `200` to match API behaviour Signed-off-by: Babak K. Shandiz --- pkg/cmd/cache/delete/delete_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/cache/delete/delete_test.go b/pkg/cmd/cache/delete/delete_test.go index dfba18f40..5422ec948 100644 --- a/pkg/cmd/cache/delete/delete_test.go +++ b/pkg/cmd/cache/delete/delete_test.go @@ -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,