Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass headers to transport #928

Merged
merged 2 commits into from
Jan 30, 2025
Merged
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
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
Loading