Adding tests, 2 are failing, looking into how to handle.
This commit is contained in:
parent
64e804e7a0
commit
3ddab331f0
1 changed files with 20 additions and 0 deletions
|
@ -320,3 +320,23 @@ class TestTerraform(object):
|
||||||
tf = Terraform(working_dir=current_path)
|
tf = Terraform(working_dir=current_path)
|
||||||
tf.import_cmd('aws_instance.foo', 'i-abc1234', no_color=IsFlagged)
|
tf.import_cmd('aws_instance.foo', 'i-abc1234', no_color=IsFlagged)
|
||||||
assert 'command: terraform import -no-color aws_instance.foo i-abc1234' in string_logger()
|
assert 'command: terraform import -no-color aws_instance.foo i-abc1234' in string_logger()
|
||||||
|
|
||||||
|
def test_create_workspace(self):
|
||||||
|
tf = Terraform(working_dir=current_path)
|
||||||
|
ret, out, err = tf.create_workspace('test')
|
||||||
|
assert ret == 0
|
||||||
|
assert err == ''
|
||||||
|
|
||||||
|
def test_set_workspace(self):
|
||||||
|
tf = Terraform(working_dir=current_path)
|
||||||
|
tf.create_workspace('test')
|
||||||
|
ret, out, err = tf.set_workspace('test')
|
||||||
|
assert ret == 0
|
||||||
|
assert err == ''
|
||||||
|
|
||||||
|
def test_show_workspace(self):
|
||||||
|
tf = Terraform(working_dir=current_path)
|
||||||
|
tf.create_workspace('test')
|
||||||
|
ret, out, err = tf.show_workspace('test')
|
||||||
|
assert ret == 0
|
||||||
|
assert err == ''
|
Loading…
Reference in a new issue