From c000d00504a6ec2c91afa073fcb52c47e2bc88f4 Mon Sep 17 00:00:00 2001 From: DJDavisson Date: Mon, 20 May 2019 11:34:42 -0700 Subject: [PATCH] Fixing tests. --- test/test_terraform.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/test_terraform.py b/test/test_terraform.py index f49be62..3b76e32 100644 --- a/test/test_terraform.py +++ b/test/test_terraform.py @@ -325,6 +325,8 @@ class TestTerraform(object): tf = Terraform(working_dir=current_path) tf.init() ret, out, err = tf.create_workspace('test') + tf.set_workspace('default') + tf.delete_workspace('test') assert ret == 0 assert err == '' @@ -332,7 +334,9 @@ class TestTerraform(object): tf = Terraform(working_dir=current_path) tf.init() 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 err == '' @@ -341,5 +345,17 @@ class TestTerraform(object): tf.init() tf.create_workspace('test') ret, out, err = tf.show_workspace() + tf.set_workspace('default') + tf.delete_workspace('test') assert ret == 0 - assert err == '' \ No newline at end of file + 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 err == ''