Fix environment-dependent test failures and modernize auth exception …#1135
Open
Fix environment-dependent test failures and modernize auth exception …#1135
Conversation
…handling Change-Id: I18e1727e360c01f635720cf9d5cf77dc24c21e22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…handling
Change-Id: I18e1727e360c01f635720cf9d5cf77dc24c21e22
To resolve these long-standing failures, I shifted the library’s test suite from an environment-dependent state to a self-bootstrapping. I modified the ConfigurationLoaderTestProvider to automatically detect and generate missing mock directories and .ini files, ensuring the suite is testable immediately upon a fresh clone. To eliminate test interference, I refactored OAuth2TokenBuilderTest to utilize unique, temporary system directories for its operations. This sandboxing prevents the destructive deletion of shared files, allowing the versioned tests to run deterministically without requiring elevated permissions.
Finally, I removed stale references to CredentialsLoaderException, which had been deprecated in newer versions of the google/auth package. These changes collectively result in a 100% pass rate, making the library more resilient and portable for all users.