Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • M mw
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • milliways
  • mw
  • Issues
  • #4
Project 'arthur/mw' was moved to 'milliways/mw'. Please update any links and bookmarks that may still have the old path.
Closed
Open
Created Dec 04, 2015 by Andrew Price@welshbyteMaintainer

Tool to mock up users, folders and message files

It would be useful to have a tool which could mock up a user database, folders database and messages files so that we can easily test patches that should be tested against an aged data set.

I imagine the tool would live in src/utils/, contain git-style subcommands and would be used like:

$ mwmock users --count 50 --deleted 20 path/to/mwdir/

which would generate 50 random users in path/to/mwdir/users.bb with a 20% chance of each user being marked as deleted. mwmock folders would work similarly to create new folders. mwmock messages would need an option to specify which folder to create the messages in but it would be useful for that functionality to be available through mwmock folders too, since the folder names will be random.

See src/user.[ch], src/folders.[ch], src/mesg.h and src/client/add.c for how the entries are created. All entries should be generated such that their fields are valid, whatever valid means.

mwmock should print any errors to stderr and exit non-zero on failure and zero on success so that it can be used in scripts.

Assignee
Assign to
Time tracking