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:
parent
02d50700b5
commit
d1a404a060
1 changed files with 6 additions and 3 deletions
9
pkg/cmd/cache/delete/delete_test.go
vendored
9
pkg/cmd/cache/delete/delete_test.go
vendored
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue