test_win_servermanager.py 757 B

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