Skip to content

Commit

Permalink
fix: pass headers to transport (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon authored Jan 30, 2025
1 parent 6460799 commit 08be3ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
1 change: 1 addition & 0 deletions dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand Down
4 changes: 2 additions & 2 deletions e2e_postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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")
}
}

Expand Down

0 comments on commit 08be3ab

Please sign in to comment.