Skip to content

Commit 08be3ab

Browse files
fix: pass headers to transport (GoogleCloudPlatform#928)
1 parent 6460799 commit 08be3ab

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
SQLSERVER_USER: "${{ steps.secrets.outputs.SQLSERVER_USER }}"
105105
SQLSERVER_PASS: "${{ steps.secrets.outputs.SQLSERVER_PASS }}"
106106
SQLSERVER_DB: "${{ steps.secrets.outputs.SQLSERVER_DB }}"
107+
QUOTA_PROJECT: "${{ vars.GOOGLE_CLOUD_PROJECT }}"
107108
# specifying bash shell ensures a failure in a piped process isn't lost by using `set -eo pipefail`
108109
shell: bash
109110
run: |

dialer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ func NewDialer(ctx context.Context, opts ...Option) (*Dialer, error) {
254254
}
255255

256256
authClient, err := httptransport.NewClient(&httptransport.Options{
257+
Headers: headers,
257258
Credentials: cfg.authCredentials,
258259
UniverseDomain: cfg.getClientUniverseDomain(),
259260
})

e2e_postgres_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var (
4747
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).
4848
postgresDB = os.Getenv("POSTGRES_DB") // Name of the database to connect to.
4949
postgresUserIAM = os.Getenv("POSTGRES_USER_IAM") // Name of database IAM user.
50-
project = os.Getenv("GOOGLE_CLOUD_PROJECT") // Name of the Google Cloud Platform project.
50+
project = os.Getenv("QUOTA_PROJECT") // Name of the Google Cloud Platform project to use for quota and billing.
5151
)
5252

5353
func requirePostgresVars(t *testing.T) {
@@ -71,7 +71,7 @@ func requirePostgresVars(t *testing.T) {
7171
case postgresUserIAM:
7272
t.Fatal("'POSTGRES_USER_IAM' env var not set")
7373
case project:
74-
t.Fatal("'GOOGLE_CLOUD_PROJECT' env var not set")
74+
t.Fatal("'QUOTA_PROJECT' env var not set")
7575
}
7676
}
7777

0 commit comments

Comments
 (0)