func setupAction(testCases []*test.TestCase, ctx *cli.Context) { for _, testCase := range testCases { err := testCase.Transition(test.SETUP) if err != nil { commands.Error(err) } } }
func provisionAction(testCases []*test.TestCase, ctx *cli.Context) { for _, testCase := range testCases { err := testCase.Transition(test.PROVISIONED) if err != nil { commands.Error(err) } } }
func destroyAction(testCases []*test.TestCase, ctx *cli.Context) { for _, testCase := range testCases { err := testCase.Transition(test.DESTROYED) if err != nil { commands.Error(err) } } }
func verifyAction(testCases []*test.TestCase, ctx *cli.Context) { for _, testCase := range testCases { err := testCase.Transition(test.VERIFIED) if err != nil { commands.Error(err) } } }
func testAction(testCases []*test.TestCase, ctx *cli.Context) { failed := false for _, testCase := range testCases { err := testCase.Transition(test.VERIFIED) if err != nil { commands.Error(err) } if testCase.State == test.FAILED { failed = true } if !ctx.Bool("dont-destroy") { err = testCase.Transition(test.DESTROYED) if err != nil { commands.Error(err) } } } if failed { os.Exit(1) } }