2016-05-25 22:32:28 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
'''
|
2018-05-10 19:51:51 +00:00
|
|
|
tests.unit.cloud.test_libcloudfuncs
|
2016-05-25 22:32:28 +00:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
'''
|
|
|
|
|
|
|
|
# Import Python libs
|
2018-01-04 19:33:39 +00:00
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
2016-05-25 22:32:28 +00:00
|
|
|
|
|
|
|
# Import Salt Testing Libs
|
2017-02-27 13:58:07 +00:00
|
|
|
from tests.support.unit import TestCase
|
2016-05-25 22:32:28 +00:00
|
|
|
|
|
|
|
# Import Salt Libs
|
|
|
|
import salt.cloud.libcloudfuncs as libcloud
|
|
|
|
|
|
|
|
|
|
|
|
class LibcloudTestCase(TestCase):
|
|
|
|
def test_node_state_libcloud_020(self):
|
|
|
|
state = libcloud.node_state(2)
|
|
|
|
self.assertEqual('TERMINATED', state)
|
|
|
|
|
|
|
|
def test_node_state_libcloud_100(self):
|
|
|
|
state = libcloud.node_state('terminated')
|
|
|
|
self.assertEqual('TERMINATED', state)
|