This review differs from previous with:
* skip verbose option (use of log.level).
* use glob.glob to retrieve files matching rather that os.walk
* fix a bug in instanceBackupFS that did not return an already
existing backup
* add two functions to handle instance backup: clearInstanceBackupFS
(to remove one or all backups of an instance), _infoInstanceBackupFS
(just to keep path/pattern info of backup into a single routine)
https://fedorahosted.org/389/attachment/ticket/47584/0003-Ticket-47584-CI-t…
Hi All,
This review is new proposal to implement CI test cases inside 389-DS.
The layout of the tests will be:
<head>/dirsrvtests/
tickets/
ticket_abc_test.py
ticket_xyz_test.py
...
finalizer
testsuites/
acl_test.py
replication_test.py
...
Each ticket_xyz_test.py will contain "framework" functions that will
allocate a fresh installed instance then the test functions:
"framework" functions are _ds_create_standalone, DSInstance class
and ds_instance pytest fixture.
tests functions are named 'test_ticket_xyz' with 'ds_instance'
fixture as argument.
py.test will call the test functions 'test_ticket_xyz'. Its argument
is an instance (ds_instance) of DSInstance where
ds_instance.instance is a connection to the instance.
The first instance of DSInstance (first ticket being tested), get a
newly created instance (e.g. slapd-standalone) and creates a backup
of the instance (under /tmp/slapd-standalone.bck/backup_HHMMSS.tar.gz).
Then when running others ticket test cases, the instance is
reinitialized from the backup.
So each ticket test case will have an instance almost like it was
just created.
py.test will discover all the ticket_xxx_test.py files and run them.
In order to remove the created instances, py.test is called a second
time to run finalizer.py.
So a jenkins job script, will do something like:
cd <head>/dirsrvtests/tickets
py.test -v # that will run all the ticket_xxx_tests and create
the instance
py.test -v finalizer.py
Note: in order to check/backup/restore instance, new functions are
added in lib389 (
checkInstanceBackupFS, instanceBackupFS, instanceRestoreFS), I will
send an other review for them as it is not in 389-DS repos.
https://fedorahosted.org/389/attachment/ticket/47575/0002-Ticket-47575-CI-t…
https://fedorahosted.org/389/ticket/47581https://fedorahosted.org/389/attachment/ticket/47581/0001-Ticket-47581-Wins…
git patch file (master)
https://fedorahosted.org/389/attachment/ticket/47581/0001-Ticket-47581-Wins…
git patch file (389-ds-base-1.2.11)
Bug description: Once WinSync backoff timer is set, even if the
protocol that the backoff timer belongs to is deleted by removing
the windows sync agreement, the timer is not deleted from the event
queue. Thus the timer is expired and backoff is called, it crashes
the server since the protocol handle is already freed, then.
Fix description: Make sure to delete the backoff timer when
1) a windows sync agreement is removed and the protocol is deleted, and
2) a new backoff timer set and there is already a backoff timer set up.