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 |
|
12004.2.1
by Benji York
add a script that smoke-tests the current librarian configuration |
9 |
import _pythonpath # Not lint, actually needed. |
10 |
||
11 |
import sys |
|
12 |
||
13 |
from zope.component import getUtility |
|
14 |
from canonical.launchpad.scripts import execute_zcml_for_scripts |
|
15 |
from canonical.librarian.interfaces import ( |
|
16 |
IRestrictedLibrarianClient, |
|
17 |
ILibrarianClient, |
|
18 |
)
|
|
12060.3.1
by Benji York
fix forgotten rename so script works again |
19 |
from canonical.librarian.smoketest import do_smoketest |
12004.2.2
by Benji York
add tests |
20 |
|
21 |
||
22 |
if __name__ == '__main__': |
|
23 |
execute_zcml_for_scripts() |
|
12004.2.1
by Benji York
add a script that smoke-tests the current librarian configuration |
24 |
restricted_client = getUtility(IRestrictedLibrarianClient) |
25 |
regular_client = getUtility(ILibrarianClient) |
|
12060.3.1
by Benji York
fix forgotten rename so script works again |
26 |
sys.exit(do_smoketest(restricted_client, regular_client)) |