mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add tests and a changelog
This commit is contained in:
parent
173b56c6a7
commit
6aa72a4657
2 changed files with 27 additions and 0 deletions
1
changelog/62220.fixed
Normal file
1
changelog/62220.fixed
Normal file
|
@ -0,0 +1 @@
|
|||
Added EndeavourOS to the Arch os_family.
|
|
@ -1110,6 +1110,32 @@ def test_almalinux_8_os_grains():
|
|||
_run_os_grains_tests(_os_release_data, _os_release_map, expectation)
|
||||
|
||||
|
||||
@pytest.mark.skip_unless_on_linux
|
||||
def test_endeavouros_os_grains(os_release_dir):
|
||||
"""
|
||||
Test if OS grains are parsed correctly in EndeavourOS
|
||||
"""
|
||||
_os_release_map = {
|
||||
"os_release_file": {
|
||||
"NAME": "EndeavourOS",
|
||||
"VERSION_ID": "22.9",
|
||||
},
|
||||
"_linux_distribution": ("EndeavourOS", "22.9", ""),
|
||||
}
|
||||
|
||||
expectation = {
|
||||
"os": "EndeavourOS",
|
||||
"os_family": "Arch",
|
||||
"oscodename": "",
|
||||
"osfullname": "EndeavourOS",
|
||||
"osrelease": "22.9",
|
||||
"osrelease_info": (22, 9),
|
||||
"osmajorrelease": 22,
|
||||
"osfinger": "EndeavourOS-22",
|
||||
}
|
||||
_run_os_grains_tests(os_release_dir, None, _os_release_map, expectation)
|
||||
|
||||
|
||||
def test_unicode_error():
|
||||
raise_unicode_mock = MagicMock(name="raise_unicode_error", side_effect=UnicodeError)
|
||||
with patch("salt.grains.core.hostname"), patch(
|
||||
|
|
Loading…
Add table
Reference in a new issue