1
0

test_info.py 968 B

123456789101112131415161718192021222324252627282930313233343536
  1. # -*- coding: utf-8 -*-
  2. '''
  3. Tests for the spm info utility
  4. '''
  5. # Import python libs
  6. from __future__ import absolute_import, print_function, unicode_literals
  7. import shutil
  8. # Import Salt Testing libs
  9. from tests.support.case import SPMCase
  10. from tests.support.helpers import destructiveTest
  11. @destructiveTest
  12. class SPMInfoTest(SPMCase):
  13. '''
  14. Validate the spm info command
  15. '''
  16. def setUp(self):
  17. self.config = self._spm_config()
  18. self._spm_build_files(self.config)
  19. def test_spm_info(self):
  20. '''
  21. test spm build
  22. '''
  23. self._spm_create_update_repo(self.config)
  24. install = self.run_spm('install', self.config, 'apache')
  25. get_info = self.run_spm('info', self.config, 'apache')
  26. check_info = ['Supported OSes', 'Supported OS', 'installing Apache']
  27. for info in check_info:
  28. self.assertIn(info, ''.join(get_info))
  29. def tearDown(self):
  30. shutil.rmtree(self._tmp_spm)