From 2e585fdd8d920e0f1c77532dfbc52fe0cbdbde3a Mon Sep 17 00:00:00 2001 From: Felipe Zipitria Date: Mon, 21 Feb 2022 08:56:21 -0300 Subject: [PATCH] feat(cloud): add also cli param to use cloud mode Signed-off-by: Felipe Zipitria --- cmd/root.go | 5 +++++ 1 file changed, 5 insertions(+) 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 + } }