Browse Source

Merge "Add Amazon Linux support to bindep"

tags/2.4.0^0
Jenkins 2 years ago
parent
commit
c47e81959e
2 changed files with 8 additions and 2 deletions
  1. 2
    2
      bindep/depends.py
  2. 6
    0
      bindep/tests/test_depends.py

+ 2
- 2
bindep/depends.py View File

@@ -243,8 +243,8 @@ class Depends(object):
243 243
         if distro in ["debian", "ubuntu"]:
244 244
             atoms.add("dpkg")
245 245
             self.platform = Dpkg()
246
-        elif distro in ["centos", "redhatenterpriseserver", "fedora",
247
-                        "opensuseproject", "opensusetumbleweed",
246
+        elif distro in ["amazonami", "centos", "redhatenterpriseserver",
247
+                        "fedora", "opensuseproject", "opensusetumbleweed",
248 248
                         "suselinux"]:
249 249
             if distro == "redhatenterpriseserver":
250 250
                 # just short alias

+ 6
- 0
bindep/tests/test_depends.py View File

@@ -62,6 +62,12 @@ class TestDepends(TestCase):
62 62
         mock_checkoutput.assert_called_once_with(["lsb_release", "-cirs"],
63 63
                                                  stderr=subprocess.STDOUT)
64 64
 
65
+    def test_detects_amazon_linux(self):
66
+        with self._mock_lsb("AmazonAMI"):
67
+            depends = Depends("")
68
+            self.assertThat(
69
+                depends.platform_profiles(), Contains("platform:amazonami"))
70
+
65 71
     def test_detects_centos(self):
66 72
         with self._mock_lsb("CentOS"):
67 73
             depends = Depends("")

Loading…
Cancel
Save