Fixing tests.
This commit is contained in:
parent
70920d828c
commit
c000d00504
1 changed files with 18 additions and 2 deletions
|
@ -325,6 +325,8 @@ class TestTerraform(object):
|
||||||
tf = Terraform(working_dir=current_path)
|
tf = Terraform(working_dir=current_path)
|
||||||
tf.init()
|
tf.init()
|
||||||
ret, out, err = tf.create_workspace('test')
|
ret, out, err = tf.create_workspace('test')
|
||||||
|
tf.set_workspace('default')
|
||||||
|
tf.delete_workspace('test')
|
||||||
assert ret == 0
|
assert ret == 0
|
||||||
assert err == ''
|
assert err == ''
|
||||||
|
|
||||||
|
@ -332,7 +334,9 @@ class TestTerraform(object):
|
||||||
tf = Terraform(working_dir=current_path)
|
tf = Terraform(working_dir=current_path)
|
||||||
tf.init()
|
tf.init()
|
||||||
tf.create_workspace('test')
|
tf.create_workspace('test')
|
||||||
ret, out, err = tf.set_workspace('test')
|
tf.set_workspace('test')
|
||||||
|
tf.set_workspace('default')
|
||||||
|
ret, out, err = tf.delete_workspace('test')
|
||||||
assert ret == 0
|
assert ret == 0
|
||||||
assert err == ''
|
assert err == ''
|
||||||
|
|
||||||
|
@ -341,5 +345,17 @@ class TestTerraform(object):
|
||||||
tf.init()
|
tf.init()
|
||||||
tf.create_workspace('test')
|
tf.create_workspace('test')
|
||||||
ret, out, err = tf.show_workspace()
|
ret, out, err = tf.show_workspace()
|
||||||
|
tf.set_workspace('default')
|
||||||
|
tf.delete_workspace('test')
|
||||||
|
assert ret == 0
|
||||||
|
assert err == ''
|
||||||
|
|
||||||
|
def test_delete_workspace(self):
|
||||||
|
tf = Terraform(working_dir=current_path)
|
||||||
|
tf.init()
|
||||||
|
tf.create_workspace('test')
|
||||||
|
tf.set_workspace('default')
|
||||||
|
ret, out, err = tf.delete_workspace('test')
|
||||||
|
tf.show_workspace()
|
||||||
assert ret == 0
|
assert ret == 0
|
||||||
assert err == ''
|
assert err == ''
|
Loading…
Reference in a new issue