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

Ensure that test secure storage access impl shares and returns token data #415

Merged
merged 4 commits into from
Apr 2, 2024

Conversation

julianlocke
Copy link
Contributor

Landing #411 revealed a previously hidden issue with SecureStorageAccessTestImpl, a class that we use to avoid interacting with keychain access during tests as setting up keychain access can be flakey.

The client setup flow–before it was fixed in the above PR–potentially created and stored a semi-authed dropbox client when using the custom transport client setup method. By potentially semi authed I mean that the client existed regardless of if an access token was retrieved from secure storage. This obscured the fact that SecureStorageAccessTestImpl was actually itself broken: multiple instances of it didn't share the same backing storage, and getAllUserIds, while necessary, was simply unimplemented.

The tests continued to pass in this state because, lacking the access token, the client would request a new one via the refresh token, and then proceed as expected.

Once 411 landed, the problems with SecureStorageAccessTestImpl were reflected in a nil DropboxClientsManager.authClient, which broke the tests. This PR fixes the tests by fixing SecureStorageAccessTestImpl, as the new auth client setup behavior is correct.

@julianlocke julianlocke merged commit fd8e029 into master Apr 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants