root / test / py / ganeti.tools.burnin_unittest.py @ 91c17910
History | View | Annotate | Download (1.2 kB)
1 | 43a840a3 | Michael Hanselmann | #!/usr/bin/python
|
---|---|---|---|
2 | 43a840a3 | Michael Hanselmann | #
|
3 | 43a840a3 | Michael Hanselmann | |
4 | 43a840a3 | Michael Hanselmann | # Copyright (C) 2013 Google Inc.
|
5 | 43a840a3 | Michael Hanselmann | #
|
6 | 43a840a3 | Michael Hanselmann | # This program is free software; you can redistribute it and/or modify
|
7 | 43a840a3 | Michael Hanselmann | # it under the terms of the GNU General Public License as published by
|
8 | 43a840a3 | Michael Hanselmann | # the Free Software Foundation; either version 2 of the License, or
|
9 | 43a840a3 | Michael Hanselmann | # (at your option) any later version.
|
10 | 43a840a3 | Michael Hanselmann | #
|
11 | 43a840a3 | Michael Hanselmann | # This program is distributed in the hope that it will be useful, but
|
12 | 43a840a3 | Michael Hanselmann | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 43a840a3 | Michael Hanselmann | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 43a840a3 | Michael Hanselmann | # General Public License for more details.
|
15 | 43a840a3 | Michael Hanselmann | #
|
16 | 43a840a3 | Michael Hanselmann | # You should have received a copy of the GNU General Public License
|
17 | 43a840a3 | Michael Hanselmann | # along with this program; if not, write to the Free Software
|
18 | 43a840a3 | Michael Hanselmann | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
19 | 43a840a3 | Michael Hanselmann | # 02110-1301, USA.
|
20 | 43a840a3 | Michael Hanselmann | |
21 | 43a840a3 | Michael Hanselmann | |
22 | 43a840a3 | Michael Hanselmann | """Script for testing ganeti.tools.burnin"""
|
23 | 43a840a3 | Michael Hanselmann | |
24 | 43a840a3 | Michael Hanselmann | import unittest |
25 | 43a840a3 | Michael Hanselmann | |
26 | 43a840a3 | Michael Hanselmann | from ganeti import constants |
27 | 43a840a3 | Michael Hanselmann | from ganeti.tools import burnin |
28 | 43a840a3 | Michael Hanselmann | |
29 | 43a840a3 | Michael Hanselmann | import testutils |
30 | 43a840a3 | Michael Hanselmann | |
31 | 43a840a3 | Michael Hanselmann | |
32 | 43a840a3 | Michael Hanselmann | class TestConstants(unittest.TestCase): |
33 | 43a840a3 | Michael Hanselmann | def testSupportedDiskTemplates(self): |
34 | 43a840a3 | Michael Hanselmann | # Ignore disk templates not supported by burnin
|
35 | 43a840a3 | Michael Hanselmann | supported = (constants.DISK_TEMPLATES - frozenset([
|
36 | 43a840a3 | Michael Hanselmann | constants.DT_BLOCK, |
37 | 43a840a3 | Michael Hanselmann | ])) |
38 | 43a840a3 | Michael Hanselmann | |
39 | 43a840a3 | Michael Hanselmann | self.assertEqual(burnin._SUPPORTED_DISK_TEMPLATES, supported)
|
40 | 43a840a3 | Michael Hanselmann | |
41 | 43a840a3 | Michael Hanselmann | |
42 | 43a840a3 | Michael Hanselmann | if __name__ == "__main__": |
43 | 43a840a3 | Michael Hanselmann | testutils.GanetiTestProgram() |