command: fix tests

This commit is contained in:
Mitchell Hashimoto 2014-07-22 19:43:09 -07:00
parent 7221e01110
commit dc0ec11ec9
3 changed files with 9 additions and 6 deletions

View File

@ -487,7 +487,7 @@ func TestApply_vars(t *testing.T) {
actual = v.(string)
}
return nil, nil
return &terraform.ResourceDiff{}, nil
}
args := []string{
@ -530,7 +530,7 @@ func TestApply_varFile(t *testing.T) {
actual = v.(string)
}
return nil, nil
return &terraform.ResourceDiff{}, nil
}
args := []string{

View File

@ -85,6 +85,7 @@ func testStateFile(t *testing.T, s *terraform.State) string {
func testProvider() *terraform.MockResourceProvider {
p := new(terraform.MockResourceProvider)
p.DiffReturn = &terraform.ResourceDiff{}
p.RefreshFn = func(
s *terraform.ResourceState) (*terraform.ResourceState, error) {
return s, nil

View File

@ -491,7 +491,8 @@ func (c *Context) applyWalkFn() depgraph.WalkFunc {
if diff == nil {
return fmt.Errorf(
"%s: diff became nil during Apply. This is a bug with "+
"the resource provider. Please report a bug.")
"the resource provider. Please report a bug.",
r.Id)
}
// Delete id from the diff because it is dependent on
@ -507,7 +508,8 @@ func (c *Context) applyWalkFn() depgraph.WalkFunc {
r.Diff, diff)
return fmt.Errorf(
"%s: diffs didn't match during apply. This is a "+
"bug with the resource provider, please report a bug.")
"bug with the resource provider, please report a bug.",
r.Id)
}
}