terraform: another test

This commit is contained in:
Mitchell Hashimoto 2015-02-11 08:52:19 -08:00
parent a616c362de
commit 5ba52ceac4
2 changed files with 8 additions and 3 deletions

View File

@ -98,11 +98,10 @@ func TestContext2Refresh_delete(t *testing.T) {
}
}
/*
func TestContextRefresh_ignoreUncreated(t *testing.T) {
func TestContext2Refresh_ignoreUncreated(t *testing.T) {
p := testProvider("aws")
m := testModule(t, "refresh-basic")
ctx := testContext(t, &ContextOpts{
ctx := testContext2(t, &ContextOpts{
Module: m,
Providers: map[string]ResourceProviderFactory{
"aws": testProviderFuncFixed(p),
@ -124,6 +123,7 @@ func TestContextRefresh_ignoreUncreated(t *testing.T) {
}
}
/*
func TestContextRefresh_hook(t *testing.T) {
h := new(MockHook)
p := testProvider("aws")

View File

@ -22,6 +22,11 @@ func (n *EvalRefresh) Eval(
state = args[1].(*InstanceState)
}
// If we have no state, we don't do any refreshing
if state == nil {
return nil, nil
}
n.Info.ModulePath = ctx.Path()
return provider.Refresh(n.Info, state)
}