Revision 45bc4635 test/py/ganeti.backend_unittest.py
b/test/py/ganeti.backend_unittest.py | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2010 Google Inc. |
|
4 |
# Copyright (C) 2010, 2013 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
423 | 423 |
_sleep_fn=sleep_fn, _prepare_fn=prepare_fn, |
424 | 424 |
_enabled=True) |
425 | 425 |
except backend.RPCFail, err: |
426 |
self.assertTrue(str(err).startswith("Remote command 'test3079' failed:")) |
|
426 |
self.assertTrue(str(err).startswith("Restricted command 'test3079'" |
|
427 |
" failed:")) |
|
427 | 428 |
self.assertTrue("stderr406328567" in str(err), |
428 | 429 |
msg="Error did not include output") |
429 | 430 |
else: |
... | ... | |
477 | 478 |
_runcmd_fn=NotImplemented, |
478 | 479 |
_enabled=False) |
479 | 480 |
except backend.RPCFail, err: |
480 |
self.assertEqual(str(err), "Remote commands disabled at configure time") |
|
481 |
self.assertEqual(str(err), |
|
482 |
"Restricted commands disabled at configure time") |
|
481 | 483 |
else: |
482 | 484 |
self.fail("Did not raise exception") |
483 | 485 |
|
Also available in: Unified diff