Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5
erp5
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Merge Requests 114
    • Merge Requests 114
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Jobs
  • Commits
  • nexedi
  • erp5erp5
  • Merge Requests
  • !771

Open
Opened Oct 12, 2018 by Jérome Perrin@jerome
  • Report abuse
Report abuse

WIP: Passwords in ERP5 tests

( this is far from being finished and not actively being worked on these days. Here are some notes below of what I remember about the current state and the ideas for next )

It's a security problem that runUnitTest starts a webserver without password for manager user.

But it's convenient for debugging / development ... at least developer running tests on his machine needs a way to know the password and it would be better if that password does not change every test run.

The general idea:

  • ERP5TypeTestCase user gets a random password.
  • every time test create user we give them a random password.
  • by default there's a manager user whose login and password are set as manager_username and manager_password class attributes. Many tests where creating a new manager user, but they should be able to use this existing user.
  • maybe we don't need this patch to allow empty passwords in publish method anymore.
  • Zelenium test seem harder, because we need to know the password and include it in the html tables for selenium. When we render the table, usually it's done when logged as manager ( I think ), so maybe generate a password from the test page template.

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://lab.nexedi.com/jerome/erp5.git feat/passwords-in-tests
git checkout -b jerome/erp5-feat/passwords-in-tests FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff jerome/erp5-feat/passwords-in-tests

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 1
  • Commits 7
  • Changes 21
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/erp5!771
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备14008524号