Exemplo n.º 1
0
def stop_start_test():
    # dunno why DirSrv.start|stop writes to dirsrv error-log
    conn.errlog = "/tmp/dirsrv-errlog"
    open(conn.errlog, "w").close()
    DirSrvTools.stop(conn)
    log.info("server stopped")
    DirSrvTools.start(conn)
    log.info("server start")
    time.sleep(5)
    # save and restore conn settings after restart
    tmp = conn.added_backends, conn.added_entries
    setup()
    conn.added_backends, conn.added_entries = tmp
    assert conn.search_s(
        *utils.searches['NAMINGCONTEXTS']), "Missing namingcontexts"
Exemplo n.º 2
0
def stop_start_test():
    # dunno why DirSrv.start|stop writes to dirsrv error-log
    conn.errlog = "/tmp/dirsrv-errlog"
    open(conn.errlog, "w").close()
    DirSrvTools.stop(conn)
    log.info("server stopped")
    DirSrvTools.start(conn)
    log.info("server start")
    time.sleep(5)
    # save and restore conn settings after restart
    tmp = conn.added_backends, conn.added_entries
    setup()
    conn.added_backends, conn.added_entries = tmp
    assert conn.search_s(
        *utils.searches['NAMINGCONTEXTS']), "Missing namingcontexts"