示例#1
0
文件: test_all.py 项目: zhengxle/ceph
    def test_run(self):
        argv = ['--use-rhceph', '--verbose']
        self.assertEqual(0, main.run(argv))

        with mock.patch('platform.linux_distribution', lambda:
                        (('unknown', '', ''))):
            self.assertRaises(exc.UnsupportedPlatform, main.run, argv)
            self.assertEqual(0, main.run(argv + ['--default=sysvinit']))
示例#2
0
文件: test_all.py 项目: isodude/ceph
    def test_run(self):
        argv = ['--use-rhceph', '--verbose']
        self.assertEqual(0, main.run(argv))

        with mock.patch('platform.linux_distribution',
                        lambda: (('unknown', '', ''))):
            self.assertRaises(exc.UnsupportedPlatform, main.run, argv)
            self.assertEqual(0, main.run(argv + ['--default=sysvinit']))
示例#3
0
 def test_run_unknown_distro(self):
     argv = ['--use-rhceph', '--verbose']
     with mock.patch.multiple('platform',
                              system=lambda: 'Linux',
                              linux_distribution=lambda **kwargs:
                              (('unknown', '', ''))):
         self.assertRaises(exc.UnsupportedPlatform, main.run, argv)
         self.assertEqual(0, main.run(argv + ['--default=sysvinit']))
示例#4
0
 def test_run(self):
     argv = ['--use-rhceph', '--verbose']
     self.assertEqual(0, main.run(argv))