mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add test
This commit is contained in:
parent
e90abe5b33
commit
807bb03fee
1 changed files with 12 additions and 0 deletions
|
@ -10,6 +10,7 @@ from salt.exceptions import CommandExecutionError
|
|||
|
||||
# Import Salt Testing Libs
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mock import patch
|
||||
from tests.support.unit import TestCase, skipIf
|
||||
|
||||
|
||||
|
@ -29,6 +30,17 @@ class WinLgpoNetshTestCase(TestCase):
|
|||
self.assertIn("Inbound", ret)
|
||||
self.assertIn("Outbound", ret)
|
||||
|
||||
def test_get_settings_firewallpolicy_lgpo_issue_57591(self):
|
||||
"""
|
||||
Should not stacktrace when the hostname contains unicode characters
|
||||
"""
|
||||
with patch.object(win_lgpo_netsh, "__hostname__", return_value="kомпьютер"):
|
||||
ret = win_lgpo_netsh.get_settings(
|
||||
profile="domain", section="firewallpolicy", store="lgpo"
|
||||
)
|
||||
self.assertIn("Inbound", ret)
|
||||
self.assertIn("Outbound", ret)
|
||||
|
||||
def test_get_settings_logging_local(self):
|
||||
ret = win_lgpo_netsh.get_settings(
|
||||
profile="domain", section="logging", store="local"
|
||||
|
|
Loading…
Add table
Reference in a new issue