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

Automate (or facilitate) creation of staff and provider test users #409

Open
jlkravitz opened this issue Dec 18, 2024 · 0 comments
Open
Assignees

Comments

@jlkravitz
Copy link
Collaborator

jlkravitz commented Dec 18, 2024

When I am testing the website, it is helpful to have – or be able to quickly create – several users with different sets of permissions.

There are several barriers to my doing so quickly at the moment:

  1. licenses.csv is the only sample CSV file I have of provider data, and it does not work if the user I'm logged in as is not a member of the correct compact.
  2. Creating staff and provider users requires different commands (an internal script for staff, using aws cognito-idp for providers).
  3. I have to fetch the temporary password from my email and then reset the password for every user I create, instead of just having a default password that works for all of them without requiring a reset (e.g., "password").
  4. I have to re-negotiate (in my own brain) sets of permissions that are worth testing every sprint.

I'm not sure of the best solution here– I could imagine anything from supporting automatic test user creation on sandbox deployment (i.e., 20 accounts are automatically created with varying permissions), or making the create user scripts more flexible, and/or not requiring password resets in sandbox environments (or all / none of the above).

Perhaps a simple step in the right direction is to create a create_test_users.py script that generates staff and providers with varying permissions and creates them in the proper AWS tables/user pools. The script could pull from a static CSV file listing key user attributes, including permissions (this will help have a consistent set of usernames for testing). Optionally, it could also generate a CSV file ala the generate_mock_data.py script.

Originally posted by @jlkravitz in #401 (comment)

@jlkravitz jlkravitz changed the title Automate (or facilitate) creation of numerous test users (staff and providers) Automate (or facilitate) creation of staff and provider test users Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants