func TestMain(m *testing.M) { // Experimental features xNewApply := flag.Bool("Xnew-apply", false, "Experiment: new apply graph") // Normal features shadow := flag.Bool("shadow", true, "Enable shadow graph") flag.Parse() // Setup experimental features X_newApply = *xNewApply if testing.Verbose() { // if we're verbose, use the logging requested by TF_LOG logging.SetOutput() } else { // otherwise silence all logs log.SetOutput(ioutil.Discard) } // Make sure shadow operations fail our real tests contextFailOnShadowError = true // Always DeepCopy the Diff on every Plan during a test contextTestDeepCopyOnPlan = true // Shadow the new graphs contextTestShadow = *shadow os.Exit(m.Run()) }
func TestMain(m *testing.M) { flag.Parse() if testing.Verbose() { // if we're verbose, use the logging requested by TF_LOG logging.SetOutput() } else { // otherwise silence all logs log.SetOutput(ioutil.Discard) } os.Exit(m.Run()) }
func TestMain(m *testing.M) { experiment.Flag(flag.CommandLine) flag.Parse() if testing.Verbose() { // if we're verbose, use the logging requested by TF_LOG logging.SetOutput() } else { // otherwise silence all logs log.SetOutput(ioutil.Discard) } // Make sure shadow operations fail our real tests contextFailOnShadowError = true // Always DeepCopy the Diff on every Plan during a test contextTestDeepCopyOnPlan = true os.Exit(m.Run()) }