Merge "Add Amazon Linux support to bindep"
This commit is contained in:
commit
c47e81959e
|
@ -243,8 +243,8 @@ class Depends(object):
|
|||
if distro in ["debian", "ubuntu"]:
|
||||
atoms.add("dpkg")
|
||||
self.platform = Dpkg()
|
||||
elif distro in ["centos", "redhatenterpriseserver", "fedora",
|
||||
"opensuseproject", "opensusetumbleweed",
|
||||
elif distro in ["amazonami", "centos", "redhatenterpriseserver",
|
||||
"fedora", "opensuseproject", "opensusetumbleweed",
|
||||
"suselinux"]:
|
||||
if distro == "redhatenterpriseserver":
|
||||
# just short alias
|
||||
|
|
|
@ -62,6 +62,12 @@ class TestDepends(TestCase):
|
|||
mock_checkoutput.assert_called_once_with(["lsb_release", "-cirs"],
|
||||
stderr=subprocess.STDOUT)
|
||||
|
||||
def test_detects_amazon_linux(self):
|
||||
with self._mock_lsb("AmazonAMI"):
|
||||
depends = Depends("")
|
||||
self.assertThat(
|
||||
depends.platform_profiles(), Contains("platform:amazonami"))
|
||||
|
||||
def test_detects_centos(self):
|
||||
with self._mock_lsb("CentOS"):
|
||||
depends = Depends("")
|
||||
|
|
Loading…
Reference in New Issue