mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add a test to check existing functionality is broken
This commit is contained in:
parent
5aeb74de63
commit
06530b5461
1 changed files with 36 additions and 0 deletions
36
tests/unit/cloud/libcloud_test.py
Normal file
36
tests/unit/cloud/libcloud_test.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
:codeauthor: `Anthony Shaw <anthonyshaw@apache.org>`
|
||||
|
||||
tests.unit.cloud.clouds.dimensiondata_test
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
'''
|
||||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import TestCase
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.cloud.libcloudfuncs as libcloud
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unit import run_tests
|
||||
run_tests(LibcloudTestCase, needs_daemon=False)
|
Loading…
Add table
Reference in a new issue