<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Times New Roman, Times, serif">Hi All,<br>
      <br>
    </font>
    <blockquote><font face="Times New Roman, Times, serif">This review
        is new proposal to implement CI test cases inside 389-DS.<br>
        The layout of the tests will be:<br>
      </font><br>
      <font face="Times New Roman, Times, serif"><tt>&lt;head&gt;/dirsrvtests/</tt><tt><br>
        </tt><tt>&nbsp;&nbsp;&nbsp; tickets/</tt><tt><br>
        </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ticket_</tt></font><tt>abc_test</tt><font
        face="Times New Roman, Times, serif"><tt>.py</tt></font><br>
      <font face="Times New Roman, Times, serif"><tt><font face="Times
            New Roman, Times, serif"><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ticket_xyz_test.py<br>
            </tt></font></tt><tt><br>
        </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br>
          <font face="Times New Roman, Times, serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font>finalizer<br>
        </tt><tt> </tt><tt><br>
        </tt><tt>&nbsp;&nbsp;&nbsp; testsuites/</tt><tt><br>
        </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; acl_test.py</tt><tt><br>
        </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; replication_test.py</tt><tt><br>
        </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...</tt><font face="Times New Roman, Times,
          serif"><br>
        </font><br>
        Each ticket_xyz_test.py will contain "framework" functions that
        will allocate a fresh installed instance then the test
        functions:<br>
        "framework" functions are _ds_create_standalone, DSInstance
        class and ds_instance pytest fixture.<br>
        tests functions are named 'test_ticket_xyz' with 'ds_instance'
        fixture as argument.<br>
        <br>
        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.<br>
        <br>
        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).<br>
        Then when running others&nbsp; ticket test cases, the instance is
        reinitialized from the backup.<br>
        So each ticket test case will have an instance almost like it
        was just created.<br>
        <br>
        py.test will discover all the ticket_xxx_test.py files and run
        them.<br>
        In order to remove the created instances, py.test is called a
        second time to run finalizer.py.<br>
        So a jenkins job script, will do something like:<br>
      </font>
      <blockquote><font face="Times New Roman, Times, serif">cd
          &lt;head&gt;/dirsrvtests/tickets<br>
          py.test -v&nbsp;&nbsp; # that will run all the ticket_xxx_tests and
          create the instance<br>
          py.test -v finalizer.py<br>
        </font></blockquote>
      <font face="Times New Roman, Times, serif"><br>
        Note: in order to check/backup/restore instance, new functions
        are added in lib389 (</font><br>
      <font face="Times New Roman, Times, serif">checkInstanceBackupFS,
        instanceBackupFS, instanceRestoreFS), I will send an other
        review for them as it is not in 389-DS repos.<br>
      </font></blockquote>
    <font face="Times New Roman, Times, serif"><a class="moz-txt-link-freetext" href="https://fedorahosted.org/389/attachment/ticket/47575/0002-Ticket-47575-CI-test-add-test-case-for-ticket47560.patch">https://fedorahosted.org/389/attachment/ticket/47575/0002-Ticket-47575-CI-test-add-test-case-for-ticket47560.patch</a></font>
  </body>
</html>