#47584 CI tests: add backup/restore of an instance
Closed: Fixed None Opened 6 years ago by tbordaz.

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
just 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
Updating 0432e1e..d947944
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)
To ssh://git.fedorahosted.org/git/389/lib389.git/
0432e1e..d947944 master -> master

commit d947944b7ec315dc10d067dfceeac760b3916425
Author: Thierry bordaz (tbordaz) tbordaz@redhat.com
Date: Wed Nov 6 14:06:49 2013 +0100

Milestone lib389 1.0 deleted

Login to comment on this ticket.