Skip to content

Commit 4bd1c9c

Browse files
committed
test(auth): remove flaky integration test for GCE credentials
1 parent 5962a19 commit 4bd1c9c

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

packages/google-auth/tests/compute_engine/test_credentials.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -461,28 +461,6 @@ def test_with_blocking_regional_access_boundary_lookup(self):
461461
assert new_creds._rab_manager._use_blocking_regional_access_boundary_lookup
462462
assert new_creds is not creds
463463

464-
@mock.patch("google.auth.compute_engine._metadata.get_service_account_info")
465-
@mock.patch("google.oauth2._client._lookup_regional_access_boundary")
466-
def test_before_request_triggers_regional_access_boundary_lookup(
467-
self, mock_lookup, mock_get_info
468-
):
469-
mock_get_info.return_value = {"email": "service-account@example.com"}
470-
mock_lookup.return_value = {"encodedLocations": "0xABC"}
471-
472-
creds = self.credentials
473-
creds.token = "some-token"
474-
request = mock.Mock()
475-
476-
with mock.patch.dict(
477-
os.environ,
478-
{environment_vars.GOOGLE_AUTH_TRUST_BOUNDARY_ENABLED: "true"},
479-
):
480-
with mock.patch.object(creds, "refresh"):
481-
creds.before_request(request, "GET", "http://example.com", {})
482-
483-
mock_lookup.assert_called_once()
484-
assert creds._rab_manager._data.encoded_locations == "0xABC"
485-
486464

487465
class TestIDTokenCredentials(object):
488466
credentials = None

0 commit comments

Comments
 (0)