command/apply: test that diff runs with existing state

This commit is contained in:
Mitchell Hashimoto 2014-06-19 12:13:47 -07:00
parent d4994b5d44
commit 879921d70f
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,10 @@ func TestApply_state(t *testing.T) {
// Verify that the provider was called with the existing state
expectedState := originalState.Resources["test_instance.foo"]
if !reflect.DeepEqual(p.DiffState, expectedState) {
t.Fatalf("bad: %#v", p.DiffState)
}
if !reflect.DeepEqual(p.ApplyState, expectedState) {
t.Fatalf("bad: %#v", p.ApplyState)
}