Skip to content

Commit ccdc562

Browse files
Azure Fixture: Add additional batch delete path (elastic#116985)
Co-authored-by: Elastic Machine <[email protected]>
1 parent 9477bd6 commit ccdc562

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/fixtures/azure-fixture/src/main/java/fixture/azure/AzureHttpHandler.java

+8
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,14 @@ public void handle(final HttpExchange exchange) throws IOException {
355355
throw new IllegalStateException("Got multiple deletes in a single request?");
356356
}
357357
toDelete = blobName;
358+
} else if (Regex.simpleMatch("DELETE /" + account + "/" + container + "/*", line)) {
359+
// possible alternative DELETE url, depending on which method is used in the batch client
360+
String path = RestUtils.decodeComponent(line.split("(\\s|\\?)")[1]);
361+
String blobName = path.split(account)[1];
362+
if (toDelete != null) {
363+
throw new IllegalStateException("Got multiple deletes in a single request?");
364+
}
365+
toDelete = blobName;
358366
}
359367
}
360368
response.append("--").append(responseBoundary).append("--\r\n0\r\n");

0 commit comments

Comments
 (0)