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

Use read-only users in integration tests where possible #1025

Open
2 tasks
AlekSi opened this issue Aug 10, 2022 · 3 comments
Open
2 tasks

Use read-only users in integration tests where possible #1025

AlekSi opened this issue Aug 10, 2022 · 3 comments
Labels
code/chore Code maintenance improvements not ready Issues that are not ready to be worked on; PRs that should skip CI

Comments

@AlekSi
Copy link
Member

AlekSi commented Aug 10, 2022

We should use a read-only user in integration tests where we can. For example, query (SELECT / find) tests do not change data and could run all queries in parallel; a read-only user will ensure that it is safe.

The implementation is not trivial because that will require changes in how we set up listeners. We should use a normal user when we insert data, then stop the first listener and start a second one with a read-only user.

Tigris is not in the scope unless they have already implemented authentication and authorization.

See references to this issue in code.

DoD:

  • Change tests' setup (for both compat and regular tests)
  • Change at least one test to use a read-only user

Notes:

  • Changing all the tests is not in the scope of the task. If needed, please create a separate task for it.
@AlekSi AlekSi added the code/chore Code maintenance improvements label Aug 10, 2022
@rumyantseva
Copy link
Member

Reasoning: we want to make tests faster

@rumyantseva
Copy link
Member

@AlekSi why do we think that having a separate read-only user would make tests faster?

@AlekSi
Copy link
Member Author

AlekSi commented Dec 14, 2022

Reasoning: we want to make tests faster

That's not accurate.

why do we think that having a separate read-only user would make tests faster?

We do not think so.

For example, query (SELECT / find) tests do not change data and could run all queries in parallel; a read-only user will ensure that it is safe.
See references to this issue in code.

Those tests are already fast; we should make them safe now

@AlekSi AlekSi added the not ready Issues that are not ready to be worked on; PRs that should skip CI label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements not ready Issues that are not ready to be worked on; PRs that should skip CI
Projects
None yet
Development

No branches or pull requests

2 participants