Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: allow signing in as non-admin users in e2e tests #15892

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

Merged
merged 11 commits into from
Dec 19, 2024

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented Dec 17, 2024

Closes coder/internal#168

Gets rid of the "global state" authentication, and adds a login helper which should be called at the beginning of each test. This means that not every test needs to authenticated as admin, and we can even have tests that encompass multiple permission levels.

We also now create more than just the single admin user during setup, so that we can have a set of users to pick from as appropriate.

@aslilac aslilac force-pushed the lilac/dont-share-e2e-auth branch from 6abe5f6 to 0dbd385 Compare December 18, 2024 19:24
@aslilac aslilac changed the title chore: allow signing in as different user per-test chore: allow signing in as non-admin users in e2e tests Dec 18, 2024
@aslilac aslilac requested a review from jaaydenh December 18, 2024 21:06
@aslilac aslilac marked this pull request as ready for review December 18, 2024 21:06
@jaaydenh
Copy link
Contributor

@aslilac could you add a description to the PR to provider more information about the goal of this PR? From what I can tell, its adds a helper so that the login can happen but its always using the admin user credentials from constants.ts. So is this enabling future changes?

Copy link
Contributor

@jaaydenh jaaydenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aslilac aslilac merged commit 962608c into main Dec 19, 2024
29 checks passed
@aslilac aslilac deleted the lilac/dont-share-e2e-auth branch December 19, 2024 23:16
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests(e2e): run tests with multiple permission levels where appropriate
2 participants