Address pull request feedback

This commit is contained in:
Sam McKelvie 2017-10-16 09:03:45 -07:00
parent 4945f4591d
commit 99c67e5fe5
2 changed files with 16 additions and 14 deletions

View file

@ -339,7 +339,8 @@ class Terraform(object):
full_value = kwargs.pop('full_value', False) full_value = kwargs.pop('full_value', False)
name_provided = (len(args) > 0) name_provided = (len(args) > 0)
kwargs['json'] = IsFlagged kwargs['json'] = IsFlagged
kwargs['capture_output'] = True if not kwargs.get('capture_output', True) is True:
raise ValueError('capture_output is required for this method')
ret, out, err = self.output_cmd(*args, **kwargs) ret, out, err = self.output_cmd(*args, **kwargs)

View file

@ -35,8 +35,9 @@ CMD_CASES = [
[ [
[ [
lambda x: x.cmd('plan', 'var_to_output', no_color=IsFlagged, var={'test_var': 'test'}) , lambda x: x.cmd('plan', 'var_to_output', no_color=IsFlagged, var={'test_var': 'test'}) ,
["doesn't need to do anything", # Expected output varies by terraform version
"no\nactions need to be performed"], ["doesn't need to do anything", # Terraform < 0.10.7 (used in travis env)
"no\nactions need to be performed"], # Terraform >= 0.10.7
0, 0,
False, False,
'', '',