Exemplo n.º 1
0
 def test_get_centos(self):
     result = hosts._get_distro("CentOS")
     assert result.__name__.endswith("centos")
Exemplo n.º 2
0
 def test_get_oracle(self):
     result = hosts._get_distro('Oracle Linux Server')
     assert result.__name__.endswith('centos')
Exemplo n.º 3
0
 def test_get_redhat(self):
     result = hosts._get_distro('RedHat')
     assert result.__name__.endswith('centos')
Exemplo n.º 4
0
 def test_get_uknown(self):
     assert hosts._get_distro('Solaris') is None
Exemplo n.º 5
0
 def test_get_debian(self):
     result = hosts._get_distro('Debian')
     assert result.__name__.endswith('debian')
Exemplo n.º 6
0
 def test_get_centos(self):
     result = hosts._get_distro('CentOS')
     assert result.__name__.endswith('centos')
Exemplo n.º 7
0
 def test_get_uknown(self):
     with raises(exc.UnsupportedPlatform):
         hosts._get_distro('Solaris')
Exemplo n.º 8
0
 def test_get_arch(self):
     result = hosts._get_distro('Arch Linux')
     assert result.__name__.endswith('arch')
Exemplo n.º 9
0
 def test_get_openeulerlinux(self):
     result = hosts._get_distro('Openeuler')
     assert result.__name__.endswith('centos')
Exemplo n.º 10
0
 def test_get_uknown(self):
     with raises(exc.UnsupportedPlatform):
         hosts._get_distro('Solaris')
Exemplo n.º 11
0
 def test_get_fallback(self):
     result = hosts._get_distro("Solaris", "Debian")
     assert result.__name__.endswith("debian")
Exemplo n.º 12
0
 def test_get_redhat(self):
     result = hosts._get_distro("RedHat")
     assert result.__name__.endswith("centos")
Exemplo n.º 13
0
 def test_get_scientific(self):
     result = hosts._get_distro("Scientific")
     assert result.__name__.endswith("centos")
Exemplo n.º 14
0
 def test_get_mint(self):
     result = hosts._get_distro('LinuxMint')
     assert result.__name__.endswith('debian')
Exemplo n.º 15
0
 def test_get_oracle(self):
     result = hosts._get_distro('Oracle Linux Server')
     assert result.__name__.endswith('centos')
Exemplo n.º 16
0
 def test_get_virtuozzo(self):
     result = hosts._get_distro('Virtuozzo Linux')
     assert result.__name__.endswith('centos')
Exemplo n.º 17
0
 def test_get_mint(self):
     result = hosts._get_distro('LinuxMint')
     assert result.__name__.endswith('debian')
Exemplo n.º 18
0
 def test_get_altlinux(self):
     result = hosts._get_distro('ALT Linux')
     assert result.__name__.endswith('alt')
Exemplo n.º 19
0
 def test_get_virtuozzo(self):
     result = hosts._get_distro('Virtuozzo Linux')
     assert result.__name__.endswith('centos')
Exemplo n.º 20
0
 def test_get_ubuntu(self):
     # Ubuntu imports debian stuff
     result = hosts._get_distro('Ubuntu')
     assert result.__name__.endswith('debian')
Exemplo n.º 21
0
 def test_get_arch(self):
     result = hosts._get_distro('Arch Linux')
     assert result.__name__.endswith('arch')
Exemplo n.º 22
0
 def test_get_scientific(self):
     result = hosts._get_distro('Scientific')
     assert result.__name__.endswith('centos')
Exemplo n.º 23
0
 def test_get_altlinux(self):
     result = hosts._get_distro('ALT Linux')
     assert result.__name__.endswith('alt')
Exemplo n.º 24
0
 def test_get_redhat_whitespace(self):
     result = hosts._get_distro('Red Hat Enterprise Linux')
     assert result.__name__.endswith('centos')
Exemplo n.º 25
0
 def test_get_eurolinux(self):
     result = hosts._get_distro('EuroLinux')
     assert result.__name__.endswith('centos')
Exemplo n.º 26
0
 def test_get_fallback(self):
     result = hosts._get_distro('Solaris', 'Debian')
     assert result.__name__.endswith('debian')
Exemplo n.º 27
0
 def test_get_debian(self):
     result = hosts._get_distro("Debian")
     assert result.__name__.endswith("debian")