Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ bazel-*
go.sum

.df-credentials.json
.sa-credentials.json
secret.json
bigquery.json
# All JSON in test_credentials/ is service-account keys etc. — never commit.
test_credentials/*.json

yarn-error.log

Expand Down
16 changes: 13 additions & 3 deletions cli/index_test_base.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
// tslint:disable tsr-detect-non-literal-fs-filename
import * as path from "path";

export const DEFAULT_DATABASE = "your-bigquery-project";
export const DEFAULT_LOCATION = "US";
export const DEFAULT_RESERVATION = "projects/your-bigquery-project/locations/us/reservations/sqlanvil-test";
// BigQuery integration test settings. Read from env vars so the project ID
// isn't committed to source. CI sets these from secrets; locally, contributors
// can set them in their shell or a sourced .envrc.
//
// See docs/gcp_test_project_setup.md for setting up the test project + creds.

export const DEFAULT_DATABASE =
process.env.SQLANVIL_TEST_BQ_PROJECT || "your-bigquery-project";
export const DEFAULT_LOCATION = process.env.SQLANVIL_TEST_BQ_LOCATION || "US";
// Reservation is optional — most contributors don't have one. Empty string
// means "use BigQuery on-demand pricing" which fits comfortably in the free
// tier for test workloads.
export const DEFAULT_RESERVATION = process.env.SQLANVIL_TEST_BQ_RESERVATION || "";
export const CREDENTIALS_PATH = path.resolve(process.env.RUNFILES, "sa/test_credentials/bigquery.json");

export const cliEntryPointPath = "cli/node_modules/@sqlanvil/cli/bundle.js";
Loading