Repository navigation
Create keys in integration tests from a two-factor sign-in - #1278
Merged
Merged
Conversation
hexpm refuses an API key, or a token exchanged for one, when creating API keys (hexpm/hexpm#2055). The tests that created keys with a key now sign in the way mix hex.user auth does: a user with two-factor authentication and an OAuth token, with the TOTP code that OAuth writes need. They pass against hexpm with and without that change.
The test authorized the organization with a stored key, which hexpm#2055 refuses for key creation, and then passed because deauth leaves no repo either way. It now signs in with two-factor and checks that auth added the repo before deauth removes it.
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.
hexpm refuses an API key, or a token exchanged for one, when creating API keys (hexpm/hexpm#2055). The integration tests that created keys with a key now sign in the way
mix hex.user authdoes: a user with two-factor authentication and an OAuth token, with the TOTP code that OAuth writes need.HexTest.Hexpmgainsnew_tfa_user/3,sign_in/1and thetotp/1helper thatHex.OrganizationAuthIntegrationTesthad.The suite passes against hexpm main and against the branch of hexpm/hexpm#2055 (850 tests, 2 skipped, each).