oscerd opened a new pull request, #29239:
URL: https://github.com/apache/camel/pull/29239

   **Depends on #29229** (CAMEL-26615), which adds the Floci AZ container to 
the Azure test-infra: until #29229 is merged,
   this PR also shows its commit. It stays a draft until then.
   
   ## Description
   
   camel-azure-eventgrid had no integration tests. [Floci 
AZ](https://github.com/floci-io/floci-az) emulates Event Grid
   custom topics, with delivery to webhook subscriptions. This PR:
   
   - adds a `camel-test-infra-azure-eventgrid` module: a local service on Floci 
AZ (`camel infra run azure event-grid`) that
     creates a topic in the CloudEvents 1.0 schema through the Azure Resource 
Manager API of Floci AZ and gives its
     endpoint, access key and resource id, and a remote one that takes the 
endpoint and key of a real topic
     (`azure.eventgrid.topic.endpoint`, `azure.eventgrid.access.key`);
   - adds `EventGridProducerIT`, which publishes through the component, 
configured as documented with the topic endpoint
     and access key, to a webhook subscriber of the test: an HTTP server that 
the Floci AZ container reaches through
     `Testcontainers.exposeHostPorts`, and that answers the validation 
handshake of the CloudEvents schema. It checks a
     single event (data, type, subject, id and time) and a list published as 
one event per element;
   - skips the integration tests on ppc64le and s390x, where the Floci AZ image 
is not available.
   
   The Event Grid SDK sends an access key only over HTTPS, so Floci AZ runs 
with TLS (`FLOCI_AZ_TLS_ENABLED=true`). The
   service writes the certificate authority of Floci AZ to a temporary PKCS12 
trust store, which the test sets as the JVM
   trust store before its first HTTPS call: the HTTP client of the SDK builds 
its default SSL context once per JVM, and
   this is the only HTTPS test of the module.
   
   The test runs against Floci AZ only: a remote topic cannot deliver its 
events to the subscriber of the test. Floci AZ
   0.16.0 does not check the access key or enforce the handshake, and does not 
keep the `data_base64`, the
   `datacontenttype` or the `source` of a CloudEvent (it sets the topic as the 
source), so the test does not check those.
   
   ## Testing
   
   - `EventGridProducerIT`: 2 tests pass against Floci AZ 0.16.0, in 5 runs in 
a row; the unit tests pass.
   - Full reactor build; the test-infra metadata is regenerated.
   
   _Claude Code on behalf of Andrea Cosentino_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to