~launchpad-pqm/launchpad/devel

12004.2.1 by Benji York
add a script that smoke-tests the current librarian configuration
1
#! /usr/bin/python -S
2
#
3
# Copyright 2010 Canonical Ltd.  This software is licensed under the
4
# GNU Affero General Public License version 3 (see the file LICENSE).
5
12004.2.2 by Benji York
add tests
6
"""Perform simple librarian operations to verify the current configuration.
12004.2.1 by Benji York
add a script that smoke-tests the current librarian configuration
7
"""
12004.2.2 by Benji York
add tests
8
14606.2.8 by William Grant
format-imports
9
import _pythonpath
14606.2.6 by William Grant
Coalesce test dirs.
10
12004.2.1 by Benji York
add a script that smoke-tests the current librarian configuration
11
import sys
12
13
from zope.component import getUtility
14606.2.5 by William Grant
Move the rest of canonical.librarian to lp.services.librarianserver.
14
15
from lp.services.librarian.interfaces.client import (
16
    ILibrarianClient,
12004.2.1 by Benji York
add a script that smoke-tests the current librarian configuration
17
    IRestrictedLibrarianClient,
18
    )
14606.2.5 by William Grant
Move the rest of canonical.librarian to lp.services.librarianserver.
19
from lp.services.librarian.smoketest import do_smoketest
20
from lp.services.scripts import execute_zcml_for_scripts
12004.2.2 by Benji York
add tests
21
22
23
if __name__ == '__main__':
24
    execute_zcml_for_scripts()
12004.2.1 by Benji York
add a script that smoke-tests the current librarian configuration
25
    restricted_client = getUtility(IRestrictedLibrarianClient)
26
    regular_client = getUtility(ILibrarianClient)
12060.3.1 by Benji York
fix forgotten rename so script works again
27
    sys.exit(do_smoketest(restricted_client, regular_client))