Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
#: * Value: Normalized value.
NORMALIZED_LSB_ID = {
'enterpriseenterprise': 'oracle', # Oracle Enterprise Linux
'redhatenterpriseworkstation': 'rhel', # RHEL 6.7
'redhatenterpriseworkstation': 'rhel', # RHEL 6, 7 Workstation
'redhatenterpriseserver': 'rhel', # RHEL 6, 7 Server
}

#: Translation table for normalizing the distro ID derived from the file name
Expand Down
1 change: 1 addition & 0 deletions tests/resources/distros/rhel5/etc/redhat-release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
22 changes: 22 additions & 0 deletions tests/test_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,28 @@ def test_raspbian8_release(self):
self._test_outcome(desired_outcome)
self._test_non_existing_release_file()

def test_rhel5_release(self):
desired_outcome = {
'id': 'rhel',
'name': 'Red Hat Enterprise Linux Server',
'pretty_name': 'Red Hat Enterprise Linux Server 5.11 (Tikanga)',
'version': '5.11',
'pretty_version': '5.11 (Tikanga)',
'best_version': '5.11',
'codename': 'Tikanga',
'major_version': '5',
'minor_version': '11'
}
self._test_outcome(desired_outcome)

desired_info = {
'id': 'redhat',
'name': 'Red Hat Enterprise Linux Server',
'version_id': '5.11',
'codename': 'Tikanga'
}
self._test_release_file_info('redhat-release', desired_info)

def test_rhel6_release(self):
desired_outcome = {
'id': 'rhel',
Expand Down