A test case or a test suite need to be isolated from side effect of others test cases run previously. For this we need to run a test case with "clean" instances.
Creating/deleting instances is consuming time and could take much more time than the test case itself.
The idea, is to create a kind of instance backup file. This backup file contains all components of the instance: config, schema, database environement, database files, certificates/keys...
Before running a test case, the test reinit the instance it needs from this backup. So it gets rapidely "clean" instances
as was discussed in email, you don't need the if verbose: log.debug
One minor thing - don't hard code "/tmp" - I don't know if there is a python function that returns the default system temporary directory, but you could look at environ['TMPDIR'] first then fallback to /tmp.
git merge ticketBackup
lib389/tools.py | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 158 insertions(+)
git push origin master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 2.55 KiB, done.
Total 4 (delta 3), reused 0 (delta 0)
0432e1e..d947944 master -> master
Author: Thierry bordaz (tbordaz) firstname.lastname@example.org
Date: Wed Nov 6 14:06:49 2013 +0100
Milestone lib389 1.0 deleted
to comment on this ticket.