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

[IMP] Remove benchmarks endpoint. Secure mobile tests endpoint. #107543

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amh-mw
Copy link
Contributor

@amh-mw amh-mw commented Dec 8, 2022

Description of the issue/feature this PR addresses:

Various testing endpoints are functional in production.

  1. /web/tests
  2. /web/tests/mobile
  3. /web/benchmarks

Current behavior before PR:

Authenticated and unauthenticated users can run test suites for no good reason in production.

Desired behavior after PR is merged:

New web.enable_tests configuration parameter is only enabled when demo data is installed.


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Dec 8, 2022

@C3POdoo C3POdoo requested review from a team December 8, 2022 15:43
@Julien00859 Julien00859 removed the request for review from a team December 12, 2022 15:43
@brboi brboi requested review from a team, pparidans and BastienFafchamps and removed request for a team January 11, 2023 09:49
@ged-odoo
Copy link
Contributor

Hello @amh-mw
I don't think this is the way we should go, adding a config parameter for this seems really overkill. Here is what we should do in my opinion:

  • remove the web/benchmark route, we don't use it anyway
  • change the auth method for the web/mobile suite to "user", I don't see why it is not exactly like the normal test suite

and that's it. now only logged users can execute the tests, but I dont see the issue with this. even more, it may be (slightly) useful in some cases. for example, after deploying a fix, or upgrading a db, running some tests manually to make sure that something is still working.

@amh-mw amh-mw changed the title [IMP] Disable web tests in production. [IMP] Remove benchmarks endpoint. Secure mobile tests endpoint. Jan 11, 2023
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.

None yet

3 participants