Skip to content

Commit 2e585fd

Browse files
committed
feat(cloud): add also cli param to use cloud mode
Signed-off-by: Felipe Zipitria <[email protected]>
1 parent 6307d19 commit 2e585fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/root.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var (
1414
cfgFile string
1515
debug bool
1616
trace bool
17+
cloud bool
1718
)
1819

1920
// rootCmd represents the base command when called without any subcommands
@@ -40,6 +41,7 @@ func init() {
4041
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "override config file (default is $PWD/.ftw.yaml)")
4142
rootCmd.PersistentFlags().BoolVarP(&debug, "debug", "", false, "debug output")
4243
rootCmd.PersistentFlags().BoolVarP(&trace, "trace", "", false, "trace output: really, really verbose")
44+
rootCmd.PersistentFlags().BoolVarP(&cloud, "cloud", "", false, "cloud mode: rely only in http status code for determining test succes or failure (assumes no logs access)")
4345
}
4446

4547
func initConfig() {
@@ -57,4 +59,7 @@ func initConfig() {
5759
log.Fatalf("cannot read config from file (%s) nor environment (%s).", errFile.Error(), errEnv.Error())
5860
}
5961
}
62+
if cloud {
63+
config.FTWConfig.TestOverride.Mode = config.CloudMode
64+
}
6065
}

0 commit comments

Comments
 (0)