@@ -116,7 +116,6 @@ func newRunCommand() *cobra.Command {
116116 if err := initProvider (opt .Provider ); err != nil {
117117 return err
118118 }
119- os .Setenv ("TEST_PROVIDER" , opt .Provider )
120119 e2e .AfterReadingAllFlags (exutil .TestContext )
121120 return opt .Run (args )
122121 })
@@ -142,9 +141,18 @@ func newRunUpgradeCommand() *cobra.Command {
142141 If you specify the --dry-run argument, the actions the suite will take will be printed to the
143142 output.
144143
144+ Supported options:
145+
146+ * abort-at=NUMBER - Set to a number between 0 and 100 to control the percent of operators
147+ at which to stop the current upgrade and roll back to the current version.
148+ * disrupt-reboot=POLICY - During upgrades, periodically reboot master nodes. If set to 'graceful'
149+ the reboot will allow the node to shut down services in an orderly fashion. If set to 'force' the
150+ machine will terminate immediately without clean shutdown.
151+
145152 ` ) + testginkgo .SuitesString (opt .Suites , "\n \n Available upgrade suites:\n \n " ),
146153
147- SilenceUsage : true ,
154+ SilenceUsage : true ,
155+ SilenceErrors : true ,
148156 RunE : func (cmd * cobra.Command , args []string ) error {
149157 return mirrorToFile (opt , func () error {
150158 if len (upgradeOpt .ToImage ) == 0 {
@@ -156,7 +164,11 @@ func newRunUpgradeCommand() *cobra.Command {
156164 if suite .Name == args [0 ] {
157165 upgradeOpt .Suite = suite .Name
158166 upgradeOpt .JUnitDir = opt .JUnitDir
159- os .Setenv ("TEST_UPGRADE" , upgradeOpt .ToEnv ())
167+ value := upgradeOpt .ToEnv ()
168+ if err := initUpgrade (value ); err != nil {
169+ return err
170+ }
171+ opt .SuiteOptions = value
160172 break
161173 }
162174 }
@@ -165,7 +177,6 @@ func newRunUpgradeCommand() *cobra.Command {
165177 if err := initProvider (opt .Provider ); err != nil {
166178 return err
167179 }
168- os .Setenv ("TEST_PROVIDER" , opt .Provider )
169180 e2e .AfterReadingAllFlags (exutil .TestContext )
170181 return opt .Run (args )
171182 })
@@ -198,7 +209,7 @@ func newRunTestCommand() *cobra.Command {
198209 if err := initProvider (os .Getenv ("TEST_PROVIDER" )); err != nil {
199210 return err
200211 }
201- if err := initUpgrade (os .Getenv ("TEST_UPGRADE " )); err != nil {
212+ if err := initUpgrade (os .Getenv ("TEST_SUITE_OPTIONS " )); err != nil {
202213 return err
203214 }
204215 e2e .AfterReadingAllFlags (exutil .TestContext )
@@ -236,6 +247,7 @@ func mirrorToFile(opt *testginkgo.Options, fn func() error) error {
236247
237248func bindOptions (opt * testginkgo.Options , flags * pflag.FlagSet ) {
238249 flags .BoolVar (& opt .DryRun , "dry-run" , opt .DryRun , "Print the tests to run without executing them." )
250+ flags .BoolVar (& opt .PrintCommands , "print-commands" , opt .PrintCommands , "Print the sub-commands that would be executed instead." )
239251 flags .StringVar (& opt .JUnitDir , "junit-dir" , opt .JUnitDir , "The directory to write test reports to." )
240252 flags .StringVar (& opt .Provider , "provider" , opt .Provider , "The cluster infrastructure provider. Will automatically default to the correct value." )
241253 flags .StringVarP (& opt .TestFile , "file" , "f" , opt .TestFile , "Create a suite from the newline-delimited test names in this file." )
0 commit comments