Skip to content

Commit

Permalink
Merge pull request #46 from fzipi/set-cloud-mode-using-cli-param
Browse files Browse the repository at this point in the history
feat(cloud): add also cli param to use cloud mode
  • Loading branch information
fzipi authored Feb 21, 2022
2 parents 6307d19 + 2e585fd commit 1e3461c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var (
cfgFile string
debug bool
trace bool
cloud bool
)

// rootCmd represents the base command when called without any subcommands
Expand All @@ -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() {
Expand All @@ -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
}
}

0 comments on commit 1e3461c

Please sign in to comment.