test_info.py 946 B

12345678910111213141516171819202122232425262728293031323334353637
  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 pytest
  9. # Import Salt Testing libs
  10. from tests.support.case import SPMCase
  11. @pytest.mark.destructive_test
  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)