From 351df8893070f8fd541dfc043df05fbb827b81ac Mon Sep 17 00:00:00 2001 From: jackwotherspoon Date: Thu, 30 Jan 2025 15:58:18 +0000 Subject: [PATCH 1/2] fix: pass headers to transport --- dialer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dialer.go b/dialer.go index 37a8def7..34289db5 100644 --- a/dialer.go +++ b/dialer.go @@ -254,6 +254,7 @@ func NewDialer(ctx context.Context, opts ...Option) (*Dialer, error) { } authClient, err := httptransport.NewClient(&httptransport.Options{ + Headers: headers, Credentials: cfg.authCredentials, UniverseDomain: cfg.getClientUniverseDomain(), }) From fbe50fa2a7a7a7aabcf45f1ffbfaf0aaa14164a4 Mon Sep 17 00:00:00 2001 From: jackwotherspoon Date: Thu, 30 Jan 2025 16:19:13 +0000 Subject: [PATCH 2/2] chore: test changing quota project --- .github/workflows/tests.yaml | 1 + e2e_postgres_test.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 4de59aa1..849b96db 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -104,6 +104,7 @@ jobs: SQLSERVER_USER: "${{ steps.secrets.outputs.SQLSERVER_USER }}" SQLSERVER_PASS: "${{ steps.secrets.outputs.SQLSERVER_PASS }}" SQLSERVER_DB: "${{ steps.secrets.outputs.SQLSERVER_DB }}" + QUOTA_PROJECT: "${{ vars.GOOGLE_CLOUD_PROJECT }}" # specifying bash shell ensures a failure in a piped process isn't lost by using `set -eo pipefail` shell: bash run: | diff --git a/e2e_postgres_test.go b/e2e_postgres_test.go index 71e77379..51f2ac2a 100644 --- a/e2e_postgres_test.go +++ b/e2e_postgres_test.go @@ -47,7 +47,7 @@ var ( postgresCustomerCASPass = os.Getenv("POSTGRES_CUSTOMER_CAS_PASS") // Password for the database user for customer CAS instances; be careful when entering a password on the command line (it may go into your terminal's history). postgresDB = os.Getenv("POSTGRES_DB") // Name of the database to connect to. postgresUserIAM = os.Getenv("POSTGRES_USER_IAM") // Name of database IAM user. - project = os.Getenv("GOOGLE_CLOUD_PROJECT") // Name of the Google Cloud Platform project. + project = os.Getenv("QUOTA_PROJECT") // Name of the Google Cloud Platform project to use for quota and billing. ) func requirePostgresVars(t *testing.T) { @@ -71,7 +71,7 @@ func requirePostgresVars(t *testing.T) { case postgresUserIAM: t.Fatal("'POSTGRES_USER_IAM' env var not set") case project: - t.Fatal("'GOOGLE_CLOUD_PROJECT' env var not set") + t.Fatal("'QUOTA_PROJECT' env var not set") } }