From e784e4a434e9d6c56c180b92bb7ef1c4495a76a3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 14 Sep 2016 11:46:36 -0700 Subject: [PATCH] terraform: remove more nil panics (doesn't change test logic) --- terraform/context_apply_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 8e7ccce388..d3a14f64da 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -835,17 +835,21 @@ func TestContext2Apply_cancel(t *testing.T) { } // Start the Apply in a goroutine + var applyErr error stateCh := make(chan *State) go func() { state, err := ctx.Apply() if err != nil { - panic(err) + applyErr = err } stateCh <- state }() state := <-stateCh + if applyErr != nil { + t.Fatalf("err: %s", applyErr) + } mod := state.RootModule() if len(mod.Resources) != 1 {