test_win_servermanager.py 763 B

1234567891011121314151617181920212223242526
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import
  3. import pytest
  4. import salt.utils.platform
  5. from tests.support.case import ModuleCase
  6. from tests.support.unit import skipIf
  7. @skipIf(not salt.utils.platform.is_windows(), "windows test only")
  8. @pytest.mark.windows_whitelisted
  9. class WinServermanagerTest(ModuleCase):
  10. """
  11. Test for salt.modules.win_servermanager
  12. """
  13. @pytest.mark.slow_test(seconds=30) # Test takes >10 and <=30 seconds
  14. def test_list_available(self):
  15. """
  16. Test list available features to install
  17. """
  18. cmd = self.run_function("win_servermanager.list_available")
  19. self.assertIn("DNS", cmd)
  20. self.assertIn("NetworkController", cmd)
  21. self.assertIn("RemoteAccess", cmd)