1
0

test_linode.py 881 B

12345678910111213141516171819202122232425262728293031
  1. # -*- coding: utf-8 -*-
  2. """
  3. :codeauthor: Nicole Thomas <nicole@saltstack.com>
  4. """
  5. # Import Python Libs
  6. from __future__ import absolute_import, print_function, unicode_literals
  7. # Create the cloud instance name to be used throughout the tests
  8. from tests.integration.cloud.helpers.cloud_test_base import TIMEOUT, CloudTest
  9. class LinodeTest(CloudTest):
  10. """
  11. Integration tests for the Linode cloud provider in Salt-Cloud
  12. """
  13. PROVIDER = "linode"
  14. REQUIRED_PROVIDER_CONFIG_ITEMS = ("apikey", "password")
  15. def test_instance(self):
  16. """
  17. Test creating an instance on Linode
  18. """
  19. # check if instance with salt installed returned
  20. ret_str = self.run_cloud(
  21. "-p linode-test {0}".format(self.instance_name), timeout=TIMEOUT
  22. )
  23. self.assertInstanceExists(ret_str)
  24. self.assertDestroyInstance()