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.