diff --git a/os.json b/os.json index 8e7439a..d7f4a1c 100644 --- a/os.json +++ b/os.json @@ -7,7 +7,6 @@ "/etc/debian_version" : ["Debian"], "/etc/debian_release" : ["Debian"], "/etc/arch-release" : ["Arch Linux"], - "/etc/os-release": ["Raspbian"], "/etc/NIXOS": ["NixOS"], "/etc/annvix-release" : ["Annvix"], "/etc/arklinux-release" : ["Arklinux"], @@ -50,5 +49,6 @@ "/etc/va-release" : ["VA-Linux/RH-VALE"], "/etc/yellowdog-release" : ["Yellow Dog"], "/etc/alpine-release": ["Alpine Linux"], - "/etc/system-release": ["Amazon Linux"] + "/etc/system-release": ["Amazon Linux"], + "/etc/os-release": ["Raspbian"] } diff --git a/tests/mockdata.json b/tests/mockdata.json index 9c6cfb1..6e90a5c 100644 --- a/tests/mockdata.json +++ b/tests/mockdata.json @@ -12,7 +12,7 @@ , { "desc": "RHEL 6.6", "platform": "linux", "file": { "/etc/redhat-release": "Red Hat Enterprise Linux Server release 6.6 (Santiago)\n" }, "expected": { "codename": "santiago", "dist": "Red Hat Linux", "os": "linux", "release": "6.6" } } , { "desc": "RHEL 7.0", "platform": "linux", "file": { "/etc/redhat-release": "Red Hat Enterprise Linux Server release 7.0 (Maipo)\n" }, "expected": { "codename": "maipo", "dist": "Red Hat Linux", "os": "linux", "release": "7.0" } } , { "desc": "SUSE Linux", "platform": "linux", "file": { "/etc/SuSE-release": "SUSE Linux Enterprise Server 11 (x86_64)\nVERSION = 11\nPATCHLEVEL = 4\n" }, "expected": { "dist": "SUSE Linux", "os": "linux", "release": "11" } } -, { "desc": "Alpine Linux", "platform": "linux", "file": { "/etc/alpine-release": "3.3\n" }, "expected": { "dist": "Alpine Linux", "os": "linux", "release": "3.3" } } +, { "desc": "Alpine Linux", "platform": "linux", "file": { "/etc/alpine-release": "3.3\n", "/etc/os-release": "NAME=\"Alpine Linux\"\nID=alpine\nVERSION_ID=3.9.2\nPRETTY_NAME=\"Alpine Linux v3.9\"\nHOME_URL=\"https://alpinelinux.org/\"\nBUG_REPORT_URL=\"https://bugs.alpinelinux.org/\"\n" }, "expected": { "dist": "Alpine Linux", "os": "linux", "release": "3.3" } } , { "desc": "Amazon Linux", "platform": "linux", "file": { "/etc/system-release": "Amazon Linux AMI release 2016.03"}, "expected": {"dist": "Amazon Linux", "os": "linux", "release": "2016.03"}} , { "desc": "Arch Linux", "platform": "linux", "file": { "/etc/lsb-release": "LSB_VERSION=1.4\nDISTRIB_ID=Arch\nDISTRIB_RELEASE=rolling\nDISTRIB_DESCRIPTION=\"Arch Linux\""}, "expected": {"dist": "Arch Linux", "os": "linux", "release": "rolling"}} , { "desc": "Linux Mint", "platform": "linux", "file": { "/etc/lsb-release": "DISTRIB_ID=LinuxMint\nDISTRIB_RELEASE=18\nDISTRIB_CODENAME=sarah\nDISTRIB_DESCRIPTION=\"Linux Mint 18 Sarah\""}, "expected": {"dist": "Linux Mint", "os": "linux", "codename": "sarah", "release": "18"}}