Skip to content

Commit 7636137

Browse files
authored
chore(auth/grpctransport): remove env impact on direct path tests (googleapis#14186)
This clears the GOOGLE_CLOUD_DISABLE_DIRECT_PATH environment variable in TestLogDirectPathMisconfig tests to prevent failures when the environment variable is set in the environment running the tests. This fixes a nuisance test error when running tests on cloudtop.
1 parent 26c937b commit 7636137

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

auth/grpctransport/directpath_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ func token(metadata map[string]interface{}) *auth.Token {
158158
}
159159

160160
func TestLogDirectPathMisconfigDirectPathNotSet(t *testing.T) {
161+
t.Setenv(disableDirectPathEnvVar, "")
161162
opts := &Options{InternalOptions: &InternalOptions{}}
162163
opts.InternalOptions.EnableDirectPathXds = true
163164

@@ -179,6 +180,7 @@ func TestLogDirectPathMisconfigDirectPathNotSet(t *testing.T) {
179180
}
180181

181182
func TestLogDirectPathMisconfigWrongCredential(t *testing.T) {
183+
t.Setenv(disableDirectPathEnvVar, "")
182184
opts := &Options{InternalOptions: &InternalOptions{
183185
EnableDirectPathXds: true,
184186
EnableDirectPath: true,
@@ -201,6 +203,7 @@ func TestLogDirectPathMisconfigWrongCredential(t *testing.T) {
201203
}
202204

203205
func TestLogDirectPathMisconfigNotOnGCE(t *testing.T) {
206+
t.Setenv(disableDirectPathEnvVar, "")
204207
opts := &Options{InternalOptions: &InternalOptions{}}
205208
opts.InternalOptions.EnableDirectPath = true
206209
opts.InternalOptions.EnableDirectPathXds = true

0 commit comments

Comments
 (0)