test_raw.py 672 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. # Import Python libs
  3. from __future__ import absolute_import, print_function, unicode_literals
  4. # Import Salt Testing Libs
  5. from tests.support.case import SSHCase
  6. from tests.support.unit import skipIf
  7. # Import Salt Libs
  8. import salt.utils.platform
  9. @skipIf(salt.utils.platform.is_windows(), 'salt-ssh not available on Windows')
  10. class SSHRawTest(SSHCase):
  11. '''
  12. testing salt-ssh with raw calls
  13. '''
  14. def test_ssh_raw(self):
  15. '''
  16. test salt-ssh with -r argument
  17. '''
  18. msg = 'running raw msg'
  19. ret = self.run_function('echo {0}'.format(msg), raw=True)
  20. self.assertEqual(ret['stdout'], msg + '\n')