1
0

test_linode.py 859 B

1234567891011121314151617181920212223242526272829
  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 CloudTest, TIMEOUT
  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('-p linode-test {0}'.format(self.instance_name), timeout=TIMEOUT)
  21. self.assertInstanceExists(ret_str)
  22. self.assertDestroyInstance()