Fix swallowed tests in terraform package tests

This commit is contained in:
Lars Lehtonen 2017-07-20 02:23:43 -07:00
parent c40be7cd14
commit 822a98a0b4
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2
4 changed files with 22 additions and 3 deletions

View File

@ -1001,7 +1001,9 @@ func TestContext2Validate_PlanGraphBuilder(t *testing.T) {
Providers: c.components.ResourceProviders(),
Targets: c.targets,
}).Build(RootModulePath)
if err != nil {
t.Fatalf("error attmepting to Build PlanGraphBuilder: %s", err)
}
defer c.acquireRun("validate-test")()
walker, err := c.walk(graph, graph, walkValidate)
if err != nil {

View File

@ -55,6 +55,9 @@ func TestNodeRefreshableDataResourceDynamicExpand_scaleOut(t *testing.T) {
StateState: state,
StateLock: &stateLock,
})
if err != nil {
t.Fatalf("error on DynamicExpand: %s", err)
}
actual := g.StringWithNodeTypes()
expected := `data.aws_instance.foo[0] - *terraform.NodeRefreshableDataResourceInstance
@ -136,7 +139,9 @@ func TestNodeRefreshableDataResourceDynamicExpand_scaleIn(t *testing.T) {
StateState: state,
StateLock: &stateLock,
})
if err != nil {
t.Fatalf("error on DynamicExpand: %s", err)
}
actual := g.StringWithNodeTypes()
expected := `data.aws_instance.foo[0] - *terraform.NodeRefreshableDataResourceInstance
data.aws_instance.foo[1] - *terraform.NodeRefreshableDataResourceInstance

View File

@ -58,6 +58,9 @@ func TestNodeRefreshableManagedResourceDynamicExpand_scaleOut(t *testing.T) {
StateState: state,
StateLock: &stateLock,
})
if err != nil {
t.Fatalf("error attempting DynamicExpand: %s", err)
}
actual := g.StringWithNodeTypes()
expected := `aws_instance.foo[0] - *terraform.NodeRefreshableManagedResourceInstance
@ -139,7 +142,9 @@ func TestNodeRefreshableManagedResourceDynamicExpand_scaleIn(t *testing.T) {
StateState: state,
StateLock: &stateLock,
})
if err != nil {
t.Fatalf("error attempting DynamicExpand: %s", err)
}
actual := g.StringWithNodeTypes()
expected := `aws_instance.foo[0] - *terraform.NodeRefreshableManagedResourceInstance
aws_instance.foo[1] - *terraform.NodeRefreshableManagedResourceInstance

View File

@ -81,6 +81,10 @@ func TestReadUpgradeStateV1toV3_emptyState(t *testing.T) {
}
stateV2, err := upgradeStateV1ToV2(orig)
if err != nil {
t.Fatalf("error attempting upgradeStateV1ToV2: %s", err)
}
for _, m := range stateV2.Modules {
if m.Resources == nil {
t.Fatal("V1 to V2 upgrade lost module.Resources")
@ -91,6 +95,9 @@ func TestReadUpgradeStateV1toV3_emptyState(t *testing.T) {
}
stateV3, err := upgradeStateV2ToV3(stateV2)
if err != nil {
t.Fatalf("error attempting to upgradeStateV2ToV3: %s", err)
}
for _, m := range stateV3.Modules {
if m.Resources == nil {
t.Fatal("V2 to V3 upgrade lost module.Resources")