diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 913ed2e81b63..9b69631343f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -647,7 +647,7 @@ jobs: if: matrix.modules == 'plugin/trino-bigquery' && !contains(matrix.profile, 'cloud-tests-2') && (env.CI_SKIP_SECRETS_PRESENCE_CHECKS != '' || env.BIGQUERY_CREDENTIALS_KEY != '') run: | $MAVEN test ${MAVEN_TEST} -pl :trino-bigquery -Pcloud-tests-1 \ - -Dbigquery.credentials-key="${BIGQUERY_CREDENTIALS_KEY}" \ + -Dtesting.bigquery.credentials-key="${BIGQUERY_CREDENTIALS_KEY}" \ -Dtesting.gcp-storage-bucket="${GCP_STORAGE_BUCKET}" \ -Dtesting.bigquery-connection-id="${BIGQUERY_TESTING_BIGLAKE_CONNECTION_ID}" - name: Cloud BigQuery Smoke Tests diff --git a/plugin/trino-bigquery/README.md b/plugin/trino-bigquery/README.md index 8cae94c1c1ae..2af821cefedd 100644 --- a/plugin/trino-bigquery/README.md +++ b/plugin/trino-bigquery/README.md @@ -31,7 +31,7 @@ You can follow the steps below to be able to run the integration tests locally. * The `TestBigQueryWithDifferentProjectIdConnectorSmokeTest` requires an alternate project ID which is different from the project ID attached to the service account but the service account still has access to. -* Set the VM options `bigquery.credentials-key`, `testing.gcp-storage-bucket`, `testing.alternate-bq-project-id`, and `testing.bigquery-connection-id` in the IntelliJ "Run Configuration" +* Set the VM options `testing.bigquery.credentials-key`, `testing.gcp-storage-bucket`, `testing.alternate-bq-project-id`, and `testing.bigquery-connection-id` in the IntelliJ "Run Configuration" (or on the CLI if using Maven directly). It should look something like - `-Dbigquery.credentials-key=base64-text -Dtesting.gcp-storage-bucket=DESTINATION_BUCKET_NAME -Dtesting.alternate-bq-project-id=bigquery-cicd-alternate -Dtesting.bigquery-connection-id=my_project.us.connection-id`. + `-Dtesting.bigquery.credentials-key=base64-text -Dtesting.gcp-storage-bucket=DESTINATION_BUCKET_NAME -Dtesting.alternate-bq-project-id=bigquery-cicd-alternate -Dtesting.bigquery-connection-id=my_project.us.connection-id`. * Run any test of your choice. diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java index 16509ed52eab..691f0868f68c 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryQueryRunner.java @@ -58,7 +58,7 @@ public final class BigQueryQueryRunner { - private static final String BIGQUERY_CREDENTIALS_KEY = requiredNonEmptySystemProperty("bigquery.credentials-key"); + private static final String BIGQUERY_CREDENTIALS_KEY = requiredNonEmptySystemProperty("testing.bigquery.credentials-key"); public static final String TPCH_SCHEMA = "tpch"; public static final String TEST_SCHEMA = "test"; @@ -113,6 +113,7 @@ public DistributedQueryRunner build() // note: additional copy via ImmutableList so that if fails on nulls Map connectorProperties = new HashMap<>(ImmutableMap.copyOf(this.connectorProperties)); + connectorProperties.putIfAbsent("bigquery.credentials-key", BIGQUERY_CREDENTIALS_KEY); connectorProperties.putIfAbsent("bigquery.views-enabled", "true"); connectorProperties.putIfAbsent("bigquery.view-expire-duration", "30m"); connectorProperties.putIfAbsent("bigquery.rpc-retries", "10");