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

   **Depends on #29818** (CAMEL-26622), which adds the Floci GCP container to 
the Google test-infra: until #29818 is merged,
   this PR also shows its commit. It stays a draft until then.
   
   ## Description
   
   The integration tests of camel-google-firestore 
(`GoogleFirestoreProducerIT`, `GoogleFirestoreConsumerIT`) ran only with
   the service account key and the project of a real Firestore 
(`google.firestore.serviceAccountKey`,
   `google.firestore.projectId`). [Floci 
GCP](https://github.com/floci-io/floci-gcp) emulates Firestore over gRPC:
   documents, collections, structured queries, aggregations, transactions, 
batch writes and real-time listeners. This PR:
   
   - adds a `camel-test-infra-google-firestore` module: a local Firestore 
service on Floci GCP (`camel infra run google
     firestore`), which gives its gRPC address and a project id 
(`test-project`: Floci GCP accepts any), and a remote one for
     the project of `google.firestore.projectId`;
   - adds `FlociGcpContainer.grpcAddress()` (`host:port`), the address that the 
gRPC clients of an emulator take;
   - runs both integration tests against it: on Floci GCP by default, through a 
Firestore client built for the emulator
     (`FirestoreOptions.setEmulatorHost`: plain text, any credentials), which 
the component takes as its `firestoreClient`
     and which is closed when the context stops, since the endpoints do not 
close a client they did not build; and with
     `-Dgoogle.instance.type=remote` against a real Firestore, with the same 
system properties as before
     (`google.firestore.serviceAccountKey`, `google.firestore.projectId`, 
`google.firestore.databaseId`);
   - skips the integration tests on ppc64le and s390x, where the Floci GCP 
image is not available;
   - regenerates the test-infra metadata: `google firestore` at version 
`0.12.0`.
   
   ## Testing
   
   - `GoogleFirestoreProducerIT` (8 tests) and `GoogleFirestoreConsumerIT` (1 
test) pass against Floci GCP 0.12.0, in 3 runs
     in a row, with no error or warning in the log; the unit tests pass.
   - With `-Dgoogle.instance.type=remote`, no container starts and the 
component reads the service account key of
     `google.firestore.serviceAccountKey` (checked without one: the tests fail 
on `FileNotFoundException: null does not
     exist`).
   - 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