-
Notifications
You must be signed in to change notification settings - Fork 250
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
dummy dataset #329
Comments
You can easily create one as follows:
Of course, to do testing/demonstration, you'd need to put the dummy-hamster.db back as ~/.local/share/hamster-applet/hamster.db, which is a real bother. You could automate this with scripts, softlinks etc.. However, it would probably be best to have a separate environment for testing/demo, say a dedicated userid or a separate VM. Edit: see below for a variation on the theme which exploits live swapping of the DB. |
Suggestion added to tips-and-tricks. Can this issue be closed? |
Thanks Gerald. The OP was asking for a database, so it looks like the issue was not how to use a separate database,
I would like this too, and as you said a separate virtual machine is nice and safe. To me the perfect testing tool would require
|
Okay, sounds good, even if your request for a "perfect testing tool" seems to go well beyond providing a "dummy dataset" as requested by the OP.
I tried to keep it simple. Instruction 1. will kill hamster-service and restarting hamster in any way restarts hamster-service automatically.
That would be a nearly infinite space :-) One might have to scaling down a bit, say to "numerous test cases". |
I was listing necessary, not sufficient conditions 😄.
True. Yet I find it more pedagogical to state
That is not the case when using Anyway, changing the database "live" (file monitoring) does work now, doesn't it ? |
Hmm, One can replace the database "live", however, deleting the database while hamster-service is running doesn't seem to automatically recreate it from the empty template DB (at least I have had problems trying that). |
Ok, I did not noticed that it was meant to create the database. # clone the repository (https way; ssh or zip file are available from the main page)
# into a hamster directory
# step not necessary if you already have the development version of course
git clone https://github.com/projecthamster/hamster.git hamster
# backup current database
cp ~/.local/share/hamster-applet/hamster.db hamster_backup.db
# overwrite main database with test one
mv hamster/data/hamster.db ~/.local/share/hamster-applet/hamster.db
# test, ...
# done; get the dummy database
cp ~/.local/share/hamster-applet/hamster.db ./dummy-hamster.db
# move back original database to main
mv hamster_backup.db ~/.local/share/hamster-applet/hamster.db Well, a bit clearer with respect to purposes, |
Okay, updated the wiki page. W.r.t. automated creation of test cases with recent dates, one can create -nnn/+nnn relative timestamps in a bash script, as in the following example:
|
Suggestions have been added to tips-and-tricks. Can this issue be closed now? |
Hi im looking of a dummy hamster.db with all the possible usecase for testing and presentation. If anyone have one at home :)
The text was updated successfully, but these errors were encountered: