oscerd opened a new pull request, #30191: URL: https://github.com/apache/camel/pull/30191
## Description The integration tests of camel-google-bigquery (`AsyncIT`, `DynamicTableIdIT`, `InsertIdIT`, `SingleRowIT`, `SqlQueryIT`, `SqlQueryFromResourceIT`, `SqlQuerySelectAndStreamIT`) ran only with the credentials of a real project. [Floci GCP](https://github.com/floci-io/floci-gcp), whose container the Google test-infra has since #29818, emulates BigQuery over REST: datasets, tables, `tabledata.insertAll`, and query jobs in GoogleSQL, which it runs on [floci-duck](https://github.com/floci-io/floci-duck), a DuckDB engine that it starts as a container of its own through the Docker socket. This PR: - adds `FlociGcpContainer.withDockerSocket()`, as `FlociAzContainer` has for the brokers of Floci AZ: it mounts the Docker socket of the host (with the SELinux labeling disabled), and gives the containers that Floci GCP starts a resource namespace of their own, by which the container removes them when it stops, or Testcontainers when the JVM exits; - adds `FlociGcpContainer.withBigQueryEngine()`, which pulls the floci-duck image of the new `google.bigquery.engine.container` key as Testcontainers pulls its own images (`mirror.gcr.io/floci/floci-duck:0.4.1`, pinned: Floci GCP takes its latest image by default) and passes it to Floci GCP; - adds a `camel-test-infra-google-bigquery` module: a local BigQuery service on Floci GCP with the engine (`camel infra run google bigquery`), which gives its endpoint and a project id, and a remote one for a real project; - runs the integration tests against it: on Floci GCP by default, through a connection factory that gives a client of the emulator without credentials (the client of `GoogleBigQueryConnectionFactory` would take the application default credentials), after creating the dataset of `simple.properties`, which a real project already has; and with `-Dgoogle.instance.type=remote` against the project of `simple.properties`, with its credentials, as before; - skips the integration tests on ppc64le and s390x, where the Floci GCP image is not available; - regenerates the test-infra metadata: `google bigquery` at version `0.12.0`. `InsertIdIT` runs only against a real project (`-Dgoogle.instance.type=remote`): it checks that BigQuery drops a row whose `insertId` it has already seen, which BigQuery does on a best-effort basis and Floci GCP does not do at all. ## Testing - Against Floci GCP 0.12.0 and floci-duck 0.4.1: 7 tests pass, the 2 of `InsertIdIT` are skipped, in 3 runs in a row; the containers that Floci GCP starts are removed after the run. The unit tests pass. - With `-Dgoogle.instance.type=remote`, no container starts, `InsertIdIT` runs, and the connection factory takes the credentials of `simple.properties` or the application default ones (checked without any: the tests fail on `Your default credentials were not found`). - 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]
