mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
test(gc): require the SeaweedFS completed-delete HTTP 202 response
This commit is contained in:
1 parent
d88b2966cd
commit
1fc3d1f45b
1 file changed
+2
-2
@@ -340,7 +340,7 @@ func TestGC_CopyIntentSurvivesTakeover(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSWFS_DeleteBlobStatusesAndExactPath(t *testing.T) {
|
||||
for _, status := range []int{200, 204, 404, 401, 500} {
|
||||
for _, status := range []int{200, 202, 204, 404, 401, 500} {
|
||||
t.Run(http.StatusText(status), func(t *testing.T) {
|
||||
calls := 0
|
||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -353,7 +353,7 @@ func TestSWFS_DeleteBlobStatusesAndExactPath(t *testing.T) {
|
||||
defer server.Close()
|
||||
c := &SWFS{http: server.Client(), vidCache: map[string][]string{"7": {strings.TrimPrefix(server.URL, "http://")}}}
|
||||
e := c.DeleteBlob(context.Background(), "7,01abcdef")
|
||||
if (e == nil) != (status == 200 || status == 204 || status == 404) {
|
||||
if (e == nil) != (status == 200 || status == 202 || status == 204 || status == 404) {
|
||||
t.Fatalf("status %d: %v", status, e)
|
||||
}
|
||||
if calls != 1 {
|
||||
|
||||
Reference in new issue
Block a user