(t *testing.T)
| 2429 | } |
| 2430 | |
| 2431 | func TestDeleteNonExistentDoc(t *testing.T) { |
| 2432 | rt := NewRestTester(t, nil) |
| 2433 | defer rt.Close() |
| 2434 | |
| 2435 | response := rt.SendAdminRequest("DELETE", "/{{.keyspace}}/fake", "") |
| 2436 | RequireStatus(t, response, http.StatusOK) |
| 2437 | |
| 2438 | response = rt.SendAdminRequest("GET", "/{{.keyspace}}/fake", "") |
| 2439 | RequireStatus(t, response, http.StatusNotFound) |
| 2440 | |
| 2441 | var body map[string]interface{} |
| 2442 | _, err := rt.GetSingleDataStore().Get("fake", &body) |
| 2443 | |
| 2444 | if base.TestUseXattrs() { |
| 2445 | assert.Error(t, err) |
| 2446 | assert.True(t, base.IsDocNotFoundError(err)) |
| 2447 | assert.Nil(t, body) |
| 2448 | } else { |
| 2449 | assert.NoError(t, err) |
| 2450 | } |
| 2451 | } |
| 2452 | |
| 2453 | // CBG-1153 |
| 2454 | func TestDeleteEmptyBodyDoc(t *testing.T) { |
nothing calls this directly
no test coverage detected