3
# Copyright (C) 2012, Canonical Ltd (http://www.canonical.com/)
5
# This file is part of ubuntu-server-iso-testing.
7
# ubuntu-server-iso-testing is free software: you can redistribute it
8
# and/or modify it under the terms of the GNU General Public License
9
# as published by the Free Software Foundation, either version 3 of
10
# the License, or (at your option) any later version.
12
# ubuntu-server-iso-testing is distributed in the hope that it will
13
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with ubuntu-server-iso-testing. If not, see
19
# <http://www.gnu.org/licenses/>.
29
logging.basicConfig(level=logging.INFO)
31
class MultiLvmTest(unittest.TestCase):
34
cmd = ["lvs", "--noheadings"]
35
logging.debug("Cmd: %s" % (cmd))
36
output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
37
logging.debug("Cmd output: %s" % (output))
38
# root home usr var tmp swap
39
num_lvs = len(output.strip().split("\n"))
40
self.assertTrue(num_lvs == 6, "Not able to find 6 logical volumes - found %s" % num_lvs)
42
if __name__ == '__main__':