test_files.py 961 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # -*- coding: utf-8 -*-
  2. """
  3. Tests for the spm files utility
  4. """
  5. from __future__ import absolute_import, print_function, unicode_literals
  6. import os
  7. import shutil
  8. import pytest
  9. from tests.support.case import SPMCase
  10. from tests.support.helpers import destructiveTest, slowTest
  11. @destructiveTest
  12. @pytest.mark.windows_whitelisted
  13. class SPMFilesTest(SPMCase):
  14. """
  15. Validate the spm files command
  16. """
  17. def setUp(self):
  18. self.config = self._spm_config()
  19. self._spm_build_files(self.config)
  20. @slowTest
  21. def test_spm_files(self):
  22. """
  23. test spm files
  24. """
  25. self._spm_create_update_repo(self.config)
  26. install = self.run_spm("install", self.config, "apache")
  27. get_files = self.run_spm("files", self.config, "apache")
  28. os.path.exists(
  29. os.path.join(self.config["formula_path"], "apache", "apache.sls")
  30. )
  31. def tearDown(self):
  32. shutil.rmtree(self._tmp_spm)