Skip to content

Commit

Permalink
Add Astra Linux Common Edition to the OS Family list (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliogonzalez authored and meaksh committed Mar 23, 2020
1 parent fa34f4b commit 148baef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions salt/grains/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,7 @@ def id_():
'Funtoo': 'Gentoo',
'AIX': 'AIX',
'TurnKey': 'Debian',
'AstraLinuxCE': 'Debian',
}

# Matches any possible format:
Expand Down
20 changes: 20 additions & 0 deletions tests/unit/grains/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,26 @@ def test_ubuntu_artful_os_grains(self):
}
self._run_os_grains_tests("ubuntu-17.10", _os_release_map, expectation)

@skipIf(not salt.utils.platform.is_linux(), 'System is not Linux')
def test_astralinuxce_2_os_grains(self):
'''
Test if OS grains are parsed correctly in Astra Linux CE 2.12.22 "orel"
'''
_os_release_map = {
'linux_distribution': ('AstraLinuxCE', '2.12.22', 'orel'),
}
expectation = {
'os': 'AstraLinuxCE',
'os_family': 'Debian',
'oscodename': 'orel',
'osfullname': 'AstraLinuxCE',
'osrelease': '2.12.22',
'osrelease_info': (2, 12, 22),
'osmajorrelease': 2,
'osfinger': 'AstraLinuxCE-2',
}
self._run_os_grains_tests("astralinuxce-2.12.22", _os_release_map, expectation)

@skipIf(not salt.utils.platform.is_windows(), 'System is not Windows')
def test_windows_platform_data(self):
'''
Expand Down

0 comments on commit 148baef

Please sign in to comment.