test_grains.py 870 B

1234567891011121314151617181920212223242526272829303132
  1. # -*- coding: utf-8 -*-
  2. # Import Python libs
  3. from __future__ import absolute_import, print_function, unicode_literals
  4. # Import Salt Libs
  5. import salt.utils.platform
  6. # Import Salt Testing Libs
  7. from tests.support.case import SSHCase
  8. from tests.support.unit import skipIf
  9. @skipIf(salt.utils.platform.is_windows(), "salt-ssh not available on Windows")
  10. class SSHGrainsTest(SSHCase):
  11. """
  12. testing grains with salt-ssh
  13. """
  14. @skipIf(True, "SLOWTEST skip")
  15. def test_grains_items(self):
  16. """
  17. test grains.items with salt-ssh
  18. """
  19. ret = self.run_function("grains.items")
  20. grain = "Linux"
  21. if salt.utils.platform.is_darwin():
  22. grain = "Darwin"
  23. if salt.utils.platform.is_aix():
  24. grain = "AIX"
  25. self.assertEqual(ret["kernel"], grain)
  26. self.assertTrue(isinstance(ret, dict))