From: Andrey Parfenov Date: Mon, 3 Apr 2017 13:38:37 +0000 (+0300) Subject: ceph-detect-init: Add tests for Virtuozzo Linux support X-Git-Tag: v12.0.2~124^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cbde5f936c772e46d68810a07507f479bb5095ab;p=ceph.git ceph-detect-init: Add tests for Virtuozzo Linux support Signed-off-by: Andrey Parfenov --- diff --git a/src/ceph-detect-init/tests/test_all.py b/src/ceph-detect-init/tests/test_all.py index eb48bb42698a..263cd9a289b1 100644 --- a/src/ceph-detect-init/tests/test_all.py +++ b/src/ceph-detect-init/tests/test_all.py @@ -217,6 +217,7 @@ class TestCephDetectInit(testtools.TestCase): self.assertEqual(suse, g('suse')) self.assertEqual(rhel, g('redhat', use_rhceph=True)) self.assertEqual(gentoo, g('gentoo')) + self.assertEqual(centos, g('virtuozzo')) def test_normalized_distro_name(self): n = ceph_detect_init._normalized_distro_name @@ -246,6 +247,7 @@ class TestCephDetectInit(testtools.TestCase): self.assertEqual('gentoo', n('funtoo')) self.assertEqual('gentoo', n('Exherbo')) self.assertEqual('gentoo', n('exherbo')) + self.assertEqual('virtuozzo', n('Virtuozzo Linux')) @mock.patch('platform.system', lambda: 'Linux') def test_platform_information_linux(self): @@ -284,6 +286,11 @@ class TestCephDetectInit(testtools.TestCase): self.assertEqual(('Oracle VM server', '3.4.2', 'OVS3.4.2'), ceph_detect_init.platform_information()) + with mock.patch('platform.linux_distribution', + lambda **kwargs: (('Virtuozzo Linux', '7.3', ''))): + self.assertEqual(('Virtuozzo Linux', '7.3', 'virtuozzo'), + ceph_detect_init.platform_information()) + @mock.patch('platform.linux_distribution') def test_platform_information_container(self, mock_linux_dist): import sys