This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new da1f1cd24 chore: floci-az 0.17.0 in the Azure tests, without the
Append Block header workaround (#3321)
da1f1cd24 is described below
commit da1f1cd247fb332dd4daa6e3924827917fe579da
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Nov 21 13:46:16 2026 +0100
chore: floci-az 0.17.0 in the Azure tests, without the Append Block header
workaround (#3321)
floci-az 0.17.0 sends the x-ms-request-server-encrypted header in its
answer to Append Block, so AzureBlobClient no longer adds it.
Claude-Session: https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../src/test/resources/azure/AzureBlobClient.java | 62 ----------------------
...e-storage-blob-append-sink-route.citrus.it.yaml | 2 +-
...ge-blob-event-based-source-route.citrus.it.yaml | 2 +-
.../azure-storage-blob-sink-route.citrus.it.yaml | 2 +-
...-storage-blob-source-limit-route.citrus.it.yaml | 2 +-
.../azure-storage-blob-source-route.citrus.it.yaml | 2 +-
...zure-storage-datalake-sink-route.citrus.it.yaml | 2 +-
...age-datalake-source-delete-route.citrus.it.yaml | 2 +-
...re-storage-datalake-source-route.citrus.it.yaml | 2 +-
.../azure-storage-queue-sink-route.citrus.it.yaml | 2 +-
...azure-storage-queue-source-route.citrus.it.yaml | 2 +-
11 files changed, 10 insertions(+), 72 deletions(-)
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/AzureBlobClient.java
b/tests/camel-kamelets-itest/src/test/resources/azure/AzureBlobClient.java
index 9f6c99769..d7f1dc045 100644
--- a/tests/camel-kamelets-itest/src/test/resources/azure/AzureBlobClient.java
+++ b/tests/camel-kamelets-itest/src/test/resources/azure/AzureBlobClient.java
@@ -15,21 +15,12 @@
* limitations under the License.
*/
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-
-import com.azure.core.http.HttpHeaderName;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.storage.blob.BlobServiceClient;
import com.azure.storage.blob.BlobServiceClientBuilder;
import com.azure.storage.common.StorageSharedKeyCredential;
import org.apache.camel.BindToRegistry;
import org.apache.camel.PropertyInject;
import org.apache.camel.builder.RouteBuilder;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
/**
* A Blob storage client for the emulator. The azure-storage-blob component
takes the one BlobServiceClient of the
@@ -37,8 +28,6 @@ import reactor.core.publisher.Mono;
*/
public class AzureBlobClient extends RouteBuilder {
- private static final HttpHeaderName SERVER_ENCRYPTED =
HttpHeaderName.fromString("x-ms-request-server-encrypted");
-
@PropertyInject("azure.url")
private String url;
@@ -53,60 +42,9 @@ public class AzureBlobClient extends RouteBuilder {
return new BlobServiceClientBuilder()
.endpoint(url + "/" + accountName)
.credential(new StorageSharedKeyCredential(accountName,
accessKey))
- .addPolicy(serverEncryptedHeader())
.buildClient();
}
- /**
- * The emulator leaves the x-ms-request-server-encrypted header out of its
answer to Append Block, which Azure
- * always sends and the SDK reads without a null check, so this adds it.
- */
- private static HttpPipelinePolicy serverEncryptedHeader() {
- return (context, next) -> next.process()
- .map(response -> response.getHeaderValue(SERVER_ENCRYPTED) !=
null ? response : withServerEncrypted(response));
- }
-
- private static HttpResponse withServerEncrypted(HttpResponse response) {
- HttpHeaders headers = new
HttpHeaders(response.getHeaders()).set(SERVER_ENCRYPTED, "true");
- return new HttpResponse(response.getRequest()) {
- @Override
- public int getStatusCode() {
- return response.getStatusCode();
- }
-
- @Override
- @Deprecated
- public String getHeaderValue(String name) {
- return headers.getValue(name);
- }
-
- @Override
- public HttpHeaders getHeaders() {
- return headers;
- }
-
- @Override
- public Flux<ByteBuffer> getBody() {
- return response.getBody();
- }
-
- @Override
- public Mono<byte[]> getBodyAsByteArray() {
- return response.getBodyAsByteArray();
- }
-
- @Override
- public Mono<String> getBodyAsString() {
- return response.getBodyAsString();
- }
-
- @Override
- public Mono<String> getBodyAsString(Charset charset) {
- return response.getBodyAsString(charset);
- }
- };
- }
-
@Override
public void configure() {
// only the client, no routes
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-append-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-append-sink-route.citrus.it.yaml
index 30758d9c5..c3200c59b 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-append-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-append-sink-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-event-based-source-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-event-based-source-route.citrus.it.yaml
index 80f954d97..c379f2eea 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-event-based-source-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-event-based-source-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-sink-route.citrus.it.yaml
index 0137bbc81..8131087c3 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-sink-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-limit-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-limit-route.citrus.it.yaml
index 886330283..8db2fd4c1 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-limit-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-limit-route.citrus.it.yaml
@@ -23,7 +23,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-route.citrus.it.yaml
index e24a6ad43..772ed983e 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-blob-source-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-sink-route.citrus.it.yaml
index 5874fe6cb..1c248d114 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-sink-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-delete-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-delete-route.citrus.it.yaml
index f7680e893..4ae68fec9 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-delete-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-delete-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-route.citrus.it.yaml
index 5b8dea9de..f1149a3d1 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-datalake-source-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-sink-route.citrus.it.yaml
index ae321a646..5ec170c7d 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-sink-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-source-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-source-route.citrus.it.yaml
index 27ab07fee..2853958ae 100644
---
a/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-source-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/azure/azure-storage-queue-source-route.citrus.it.yaml
@@ -24,7 +24,7 @@ actions:
start:
container:
name: "azure"
- image: "floci/floci-az:0.16.0"
+ image: "floci/floci-az:0.17.0"
autoRemove: true
startUpTimeout: 120
exposedPorts: