diff --git a/cmd/root.go b/cmd/root.go index 82718720..775e8dd4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -14,6 +14,7 @@ var ( cfgFile string debug bool trace bool + cloud bool ) // rootCmd represents the base command when called without any subcommands @@ -40,6 +41,7 @@ func init() { rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "override config file (default is $PWD/.ftw.yaml)") rootCmd.PersistentFlags().BoolVarP(&debug, "debug", "", false, "debug output") rootCmd.PersistentFlags().BoolVarP(&trace, "trace", "", false, "trace output: really, really verbose") + rootCmd.PersistentFlags().BoolVarP(&cloud, "cloud", "", false, "cloud mode: rely only in http status code for determining test succes or failure (assumes no logs access)") } func initConfig() { @@ -57,4 +59,7 @@ func initConfig() { log.Fatalf("cannot read config from file (%s) nor environment (%s).", errFile.Error(), errEnv.Error()) } } + if cloud { + config.FTWConfig.TestOverride.Mode = config.CloudMode + } }