add test case for options

merge-requests/1/head
Freddy Tan 8 years ago
parent f1e0ce62ed
commit 839b30d72a

@ -79,6 +79,20 @@ class TestTerraform(object):
assert expected_output in out.replace('\n', '').replace(' ', '')
assert err == ''
@pytest.mark.parametrize(
['cmd', 'args', 'options'],
[
# bool value
('fmt', ['bad_fmt'], {'list': False, 'diff': False})
]
)
def test_options(self, cmd, args, options):
tf = Terraform(working_dir=current_path)
ret, out, err = getattr(tf, cmd)(*args, **options)
assert ret == 0
assert out == ''
# todo revert the test file
def test_state_data(self):
cwd = os.path.join(current_path, 'test_tfstate_file')

Loading…
Cancel
Save