terraform: disable shadowing the experimental graph

This commit is contained in:
Mitchell Hashimoto 2016-10-20 15:17:28 -07:00
parent 14cff93b67
commit 2c1a21a8ef
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 14 additions and 0 deletions

View File

@ -51,6 +51,11 @@ var (
// Plan operation, effectively testing the Diff DeepCopy whenever
// a Plan occurs. This is enabled for tests.
contextTestDeepCopyOnPlan = false
// contextTestShadow will enable the shadow graph for the new graphs.
// This is enabled for tests. This will be removed very shortly and
// be enabled by default.
contextTestShadow = false
)
// ContextOpts are the user-configurable options to create a context with
@ -422,6 +427,12 @@ func (c *Context) Apply() (*State, error) {
}
}
// For now, always shadow with the real graph for verification. We don't
// want to shadow yet with the new graphs.
if !contextTestShadow {
shadow = real
}
// Determine the operation
operation := walkApply
if c.destroy {

View File

@ -47,6 +47,9 @@ func TestMain(m *testing.M) {
// Always DeepCopy the Diff on every Plan during a test
contextTestDeepCopyOnPlan = true
// Shadow the new graphs
contextTestShadow = true
os.Exit(m.Run())
}