full flag support for automate HA test command
@@ -13,8 +13,10 @@ Usage:
chef-automate test
run smoke tests manually.
`
+var testCommandFlags = struct {
+ full bool
+}{}
-func newTestCmd() *cobra.Command {
var testCmd = &cobra.Command{
Use: "test",
Short: "Run Automate HA smoke tests",
@@ -23,11 +25,11 @@ func newTestCmd() *cobra.Command {
RunE: runTestCmd,
}
- return testCmd
-}
-
func runTestCmd(cmd *cobra.Command, args []string) error {
if isA2HARBFileExist() {
+ if testCommandFlags.full {
+ args = append(args, "--full")
+ }
return executeAutomateClusterCtlCommand("test", args, testHAHelpDocs)
} else {
return status.Wrap(errors.New("Test command only work with HA mode of automate"), status.ConfigError, testHAHelpDocs)
@@ -36,5 +38,10 @@ func runTestCmd(cmd *cobra.Command, args []string) error {
}
func init() {
- RootCmd.AddCommand(newTestCmd())
+ testCmd.PersistentFlags().BoolVar(
+ &testCommandFlags.full,
+ "full",
+ false,
+ "Automate ha cluster test full")
+ RootCmd.AddCommand(testCmd)
}
