Browse code

Update oc create success message when using --dry-run

juanvallejo authored on 2016/09/22 04:51:29
Showing 26 changed files
... ...
@@ -289,7 +289,7 @@ func (o *ResourceVisitor) Visit(fn MigrateVisitFunc) error {
289 289
 
290 290
 	if summarize {
291 291
 		if dryRun {
292
-			fmt.Fprintf(out, "summary (DRY RUN): total=%d errors=%d ignored=%d unchanged=%d migrated=%d\n", t.found, t.errors, t.ignored, t.unchanged, t.found-t.errors-t.unchanged-t.ignored)
292
+			fmt.Fprintf(out, "summary (dry run): total=%d errors=%d ignored=%d unchanged=%d migrated=%d\n", t.found, t.errors, t.ignored, t.unchanged, t.found-t.errors-t.unchanged-t.ignored)
293 293
 		} else {
294 294
 			fmt.Fprintf(out, "summary: total=%d errors=%d ignored=%d unchanged=%d migrated=%d\n", t.found, t.errors, t.ignored, t.unchanged, t.found-t.errors-t.unchanged-t.ignored)
295 295
 		}
... ...
@@ -403,7 +403,7 @@ func (t *migrateTracker) attempt(info *resource.Info, retries int) {
403 403
 	case result == attemptResultSuccess:
404 404
 		if glog.V(1) {
405 405
 			if t.dryRun {
406
-				t.report("migrated (DRY RUN):", info, nil)
406
+				t.report("migrated (dry run):", info, nil)
407 407
 			} else {
408 408
 				t.report("migrated:", info, nil)
409 409
 			}
... ...
@@ -234,7 +234,7 @@ func (o *CancelBuildOptions) RunCancelBuild() error {
234 234
 			}
235 235
 
236 236
 			resource, name, _ := cmdutil.ResolveResource(buildapi.Resource("builds"), build.Name, o.Mapper)
237
-			kcmdutil.PrintSuccess(o.Mapper, false, o.Out, resource.Resource, name, "cancelled")
237
+			kcmdutil.PrintSuccess(o.Mapper, false, o.Out, resource.Resource, name, false, "cancelled")
238 238
 		}(b)
239 239
 	}
240 240
 	wg.Wait()
... ...
@@ -248,7 +248,7 @@ func (o *CancelBuildOptions) RunCancelBuild() error {
248 248
 				continue
249 249
 			}
250 250
 			resource, name, _ := cmdutil.ResolveResource(buildapi.Resource("builds"), build.Name, o.Mapper)
251
-			kcmdutil.PrintSuccess(o.Mapper, false, o.Out, resource.Resource, name, fmt.Sprintf("restarted build %q", b.Name))
251
+			kcmdutil.PrintSuccess(o.Mapper, false, o.Out, resource.Resource, name, false, fmt.Sprintf("restarted build %q", b.Name))
252 252
 		}
253 253
 	}
254 254
 
... ...
@@ -165,12 +165,7 @@ func (o *CreateClusterQuotaOptions) Run() error {
165 165
 	}
166 166
 
167 167
 	if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 {
168
-		created := "created"
169
-		if o.DryRun {
170
-			created = "created (DRY RUN)"
171
-		}
172
-
173
-		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "clusterquota", actualObj.Name, created)
168
+		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "clusterquota", actualObj.Name, o.DryRun, "created")
174 169
 		return nil
175 170
 	}
176 171
 
... ...
@@ -153,12 +153,7 @@ func (o *CreateDeploymentConfigOptions) Run() error {
153 153
 	}
154 154
 
155 155
 	if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 {
156
-		created := "created"
157
-		if o.DryRun {
158
-			created = "created (DRY RUN)"
159
-		}
160
-
161
-		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "deploymentconfig", actualObj.Name, created)
156
+		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "deploymentconfig", actualObj.Name, o.DryRun, "created")
162 157
 		return nil
163 158
 	}
164 159
 
... ...
@@ -142,11 +142,7 @@ func (o *CreateIdentityOptions) Run() error {
142 142
 	}
143 143
 
144 144
 	if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 {
145
-		created := "created"
146
-		if o.DryRun {
147
-			created = "created (DRY RUN)"
148
-		}
149
-		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "identity", actualIdentity.Name, created)
145
+		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "identity", actualIdentity.Name, o.DryRun, "created")
150 146
 		return nil
151 147
 	}
152 148
 
... ...
@@ -135,11 +135,7 @@ func (o *CreateImageStreamOptions) Run() error {
135 135
 	}
136 136
 
137 137
 	if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 {
138
-		created := "created"
139
-		if o.DryRun {
140
-			created = "created (DRY RUN)"
141
-		}
142
-		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "imagestream", actualObj.Name, created)
138
+		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "imagestream", actualObj.Name, o.DryRun, "created")
143 139
 		return nil
144 140
 	}
145 141
 
... ...
@@ -122,7 +122,7 @@ func (o *CreatePolicyBindingOptions) Run() error {
122 122
 	}
123 123
 
124 124
 	if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 {
125
-		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "policybinding", actualBinding.Name, "created")
125
+		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "policybinding", actualBinding.Name, false, "created")
126 126
 		return nil
127 127
 	}
128 128
 
... ...
@@ -159,13 +159,8 @@ func CreateEdgeRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, ar
159 159
 		return err
160 160
 	}
161 161
 
162
-	created := "created"
163
-	if dryRun {
164
-		created = "created (DRY RUN)"
165
-	}
166
-
167 162
 	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
168
-	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created)
163
+	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "created")
169 164
 	return nil
170 165
 }
171 166
 
... ...
@@ -258,13 +253,8 @@ func CreatePassthroughRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comm
258 258
 		return err
259 259
 	}
260 260
 
261
-	created := "created"
262
-	if dryRun {
263
-		created = "created (DRY RUN)"
264
-	}
265
-
266 261
 	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
267
-	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created)
262
+	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "created")
268 263
 	return nil
269 264
 }
270 265
 
... ...
@@ -389,13 +379,8 @@ func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comman
389 389
 		return err
390 390
 	}
391 391
 
392
-	created := "created"
393
-	if dryRun {
394
-		created = "created (DRY RUN)"
395
-	}
396
-
397 392
 	shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
398
-	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, created)
393
+	kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, dryRun, "created")
399 394
 	return nil
400 395
 }
401 396
 
... ...
@@ -133,11 +133,7 @@ func (o *CreateUserOptions) Run() error {
133 133
 	}
134 134
 
135 135
 	if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 {
136
-		created := "created"
137
-		if o.DryRun {
138
-			created = "created (DRY RUN)"
139
-		}
140
-		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "user", actualUser.Name, created)
136
+		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "user", actualUser.Name, o.DryRun, "created")
141 137
 		return nil
142 138
 	}
143 139
 
... ...
@@ -135,11 +135,7 @@ func (o *CreateUserIdentityMappingOptions) Run() error {
135 135
 	}
136 136
 
137 137
 	if useShortOutput := o.OutputFormat == "name"; useShortOutput || len(o.OutputFormat) == 0 {
138
-		created := "created"
139
-		if o.DryRun {
140
-			created = "created (DRY RUN)"
141
-		}
142
-		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "useridentitymapping", actualMapping.Name, created)
138
+		cmdutil.PrintSuccess(o.Mapper, useShortOutput, o.Out, "useridentitymapping", actualMapping.Name, o.DryRun, "created")
143 139
 		return nil
144 140
 	}
145 141
 
... ...
@@ -632,7 +632,7 @@ func (o *IdleOptions) RunIdle(f *clientcmd.Factory) error {
632 632
 			}
633 633
 		}
634 634
 
635
-		fmt.Fprintf(o.out, "Idled %s %s/%s\n", scaleRef.Kind, info.namespace, scaleRef.Name)
635
+		fmt.Fprintf(o.out, "Idled %s %s/%s (dry run)\n", scaleRef.Kind, info.namespace, scaleRef.Name)
636 636
 	}
637 637
 
638 638
 	if hadError {
... ...
@@ -252,6 +252,7 @@ func (o *RollbackOptions) Run() error {
252 252
 			return err
253 253
 		}
254 254
 		o.out.Write([]byte(description))
255
+		fmt.Fprintf(o.out, "%s\n", "(dry run)")
255 256
 		return nil
256 257
 	}
257 258
 
... ...
@@ -36,12 +36,12 @@ var (
36 36
 )
37 37
 
38 38
 // RolloutLatestOptions holds all the options for the `rollout latest` command.
39
-// TODO: Support --dry-run
40 39
 type RolloutLatestOptions struct {
41 40
 	mapper meta.RESTMapper
42 41
 	typer  runtime.ObjectTyper
43 42
 	infos  []*resource.Info
44 43
 
44
+	DryRun bool
45 45
 	out    io.Writer
46 46
 	output string
47 47
 	again  bool
... ...
@@ -76,7 +76,8 @@ func NewCmdRolloutLatest(fullName string, f *clientcmd.Factory, out io.Writer) *
76 76
 		ValidArgs: []string{"deploymentconfig"},
77 77
 	}
78 78
 
79
-	kcmdutil.AddOutputFlagsForMutation(cmd)
79
+	kcmdutil.AddPrinterFlags(cmd)
80
+	kcmdutil.AddDryRunFlag(cmd)
80 81
 	cmd.Flags().Bool("again", false, "Deploy the current pod template without updating state from triggers")
81 82
 
82 83
 	return cmd
... ...
@@ -92,6 +93,8 @@ func (o *RolloutLatestOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command
92 92
 		return err
93 93
 	}
94 94
 
95
+	o.DryRun = kcmdutil.GetFlagBool(cmd, "dry-run")
96
+
95 97
 	o.oc, o.kc, err = f.Clients()
96 98
 	if err != nil {
97 99
 		return err
... ...
@@ -148,30 +151,35 @@ func (o RolloutLatestOptions) RunRolloutLatest() error {
148 148
 		return err
149 149
 	}
150 150
 
151
-	request := &deployapi.DeploymentRequest{
152
-		Name:   config.Name,
153
-		Latest: !o.again,
154
-		Force:  true,
155
-	}
151
+	dc := config
152
+	if !o.DryRun {
153
+		request := &deployapi.DeploymentRequest{
154
+			Name:   config.Name,
155
+			Latest: !o.again,
156
+			Force:  true,
157
+		}
156 158
 
157
-	dc, err := o.oc.DeploymentConfigs(config.Namespace).Instantiate(request)
158
-	// Pre 1.4 servers don't support the instantiate endpoint. Fallback to incrementing
159
-	// latestVersion on them.
160
-	if kerrors.IsNotFound(err) || kerrors.IsForbidden(err) {
161
-		config.Status.LatestVersion++
162
-		dc, err = o.oc.DeploymentConfigs(config.Namespace).Update(config)
163
-	}
164
-	if err != nil {
165
-		return err
166
-	}
159
+		dc, err = o.oc.DeploymentConfigs(config.Namespace).Instantiate(request)
160
+
161
+		// Pre 1.4 servers don't support the instantiate endpoint. Fallback to incrementing
162
+		// latestVersion on them.
163
+		if kerrors.IsNotFound(err) || kerrors.IsForbidden(err) {
164
+			config.Status.LatestVersion++
165
+			dc, err = o.oc.DeploymentConfigs(config.Namespace).Update(config)
166
+		}
167 167
 
168
-	info.Refresh(dc, true)
168
+		if err != nil {
169
+			return err
170
+		}
171
+
172
+		info.Refresh(dc, true)
173
+	}
169 174
 
170 175
 	if o.output == "revision" {
171 176
 		fmt.Fprintf(o.out, fmt.Sprintf("%d", dc.Status.LatestVersion))
172 177
 		return nil
173 178
 	}
174 179
 
175
-	kcmdutil.PrintSuccess(o.mapper, o.output == "name", o.out, info.Mapping.Resource, info.Name, "rolled out")
180
+	kcmdutil.PrintSuccess(o.mapper, o.output == "name", o.out, info.Mapping.Resource, info.Name, o.DryRun, "rolled out")
176 181
 	return nil
177 182
 }
... ...
@@ -244,7 +244,7 @@ func (o *BuildHookOptions) Run() error {
244 244
 		}
245 245
 
246 246
 		info.Refresh(obj, true)
247
-		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, "updated")
247
+		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, false, "updated")
248 248
 	}
249 249
 	if failed {
250 250
 		return cmdutil.ErrExit
... ...
@@ -266,7 +266,7 @@ func (o *BuildSecretOptions) Run() error {
266 266
 		}
267 267
 
268 268
 		info.Refresh(obj, true)
269
-		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, "updated")
269
+		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, false, "updated")
270 270
 	}
271 271
 	if len(errs) > 0 {
272 272
 		return errors.NewAggregate(errs)
... ...
@@ -289,7 +289,7 @@ func (o *DeploymentHookOptions) Run() error {
289 289
 		}
290 290
 
291 291
 		info.Refresh(obj, true)
292
-		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, "updated")
292
+		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, false, "updated")
293 293
 	}
294 294
 	if failed {
295 295
 		return cmdutil.ErrExit
... ...
@@ -538,7 +538,7 @@ updates:
538 538
 		}
539 539
 
540 540
 		shortOutput := kcmdutil.GetFlagString(cmd, "output") == "name"
541
-		kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, "updated")
541
+		kcmdutil.PrintSuccess(mapper, shortOutput, out, info.Mapping.Resource, info.Name, false, "updated")
542 542
 	}
543 543
 	if failed {
544 544
 		return cmdutil.ErrExit
... ...
@@ -346,7 +346,7 @@ func (o *ProbeOptions) Run() error {
346 346
 		}
347 347
 
348 348
 		info.Refresh(obj, true)
349
-		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, "updated")
349
+		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, false, "updated")
350 350
 	}
351 351
 	if failed {
352 352
 		return cmdutil.ErrExit
... ...
@@ -245,7 +245,7 @@ func (o *BackendsOptions) Run() error {
245 245
 		}
246 246
 
247 247
 		info.Refresh(obj, true)
248
-		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, "updated")
248
+		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, false, "updated")
249 249
 	}
250 250
 	if failed {
251 251
 		return cmdutil.ErrExit
... ...
@@ -317,7 +317,7 @@ func (o *TriggersOptions) Run() error {
317 317
 		}
318 318
 
319 319
 		info.Refresh(obj, true)
320
-		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, "updated")
320
+		kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, info.Mapping.Resource, info.Name, false, "updated")
321 321
 	}
322 322
 	if failed {
323 323
 		return cmdutil.ErrExit
... ...
@@ -484,7 +484,7 @@ func (v *VolumeOptions) RunVolume(args []string) error {
484 484
 		}
485 485
 
486 486
 		info.Refresh(obj, true)
487
-		kcmdutil.PrintSuccess(v.Mapper, false, v.Out, info.Mapping.Resource, info.Name, "updated")
487
+		kcmdutil.PrintSuccess(v.Mapper, false, v.Out, info.Mapping.Resource, info.Name, false, "updated")
488 488
 	}
489 489
 	if failed {
490 490
 		return cmdutil.ErrExit
... ...
@@ -314,7 +314,7 @@ func (o *StartBuildOptions) Run() error {
314 314
 		}
315 315
 	}
316 316
 
317
-	kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, "build", newBuild.Name, "started")
317
+	kcmdutil.PrintSuccess(o.Mapper, o.ShortOutput, o.Out, "build", newBuild.Name, false, "started")
318 318
 
319 319
 	// Stream the logs from the build
320 320
 	if o.Follow {
... ...
@@ -85,11 +85,11 @@ func (b *Bulk) Run(list *kapi.List, namespace string) []error {
85 85
 	return errs
86 86
 }
87 87
 
88
-func NewPrintNameOrErrorAfterIndent(mapper meta.RESTMapper, short bool, operation string, out, errs io.Writer, indent string) AfterFunc {
88
+func NewPrintNameOrErrorAfterIndent(mapper meta.RESTMapper, short bool, operation string, out, errs io.Writer, dryRun bool, indent string) AfterFunc {
89 89
 	return func(info *resource.Info, err error) bool {
90 90
 		if err == nil {
91 91
 			fmt.Fprintf(out, indent)
92
-			cmdutil.PrintSuccess(mapper, short, out, info.Mapping.Resource, info.Name, operation)
92
+			cmdutil.PrintSuccess(mapper, short, out, info.Mapping.Resource, info.Name, dryRun, operation)
93 93
 		} else {
94 94
 			fmt.Fprintf(errs, "%serror: %v\n", indent, err)
95 95
 		}
... ...
@@ -191,10 +191,10 @@ func (b BulkAction) WithMessage(action, individual string) Runner {
191 191
 	switch {
192 192
 	// TODO: this should be b printer
193 193
 	case b.Output == "":
194
-		b.Bulk.After = NewPrintNameOrErrorAfterIndent(b.Bulk.Mapper, false, individual, b.Out, b.ErrOut, b.DefaultIndent())
194
+		b.Bulk.After = NewPrintNameOrErrorAfterIndent(b.Bulk.Mapper, false, individual, b.Out, b.ErrOut, b.DryRun, b.DefaultIndent())
195 195
 	// TODO: needs to be unified with the name printer (incremental vs exact execution), possibly by creating b synthetic printer?
196 196
 	case b.Output == "name":
197
-		b.Bulk.After = NewPrintNameOrErrorAfterIndent(b.Bulk.Mapper, true, individual, b.Out, b.ErrOut, b.DefaultIndent())
197
+		b.Bulk.After = NewPrintNameOrErrorAfterIndent(b.Bulk.Mapper, true, individual, b.Out, b.ErrOut, b.DryRun, b.DefaultIndent())
198 198
 	default:
199 199
 		b.Bulk.After = NewPrintErrorAfter(b.Bulk.Mapper, b.ErrOut)
200 200
 		if b.StopOnError {
... ...
@@ -214,7 +214,7 @@ func (b *BulkAction) Run(list *kapi.List, namespace string) []error {
214 214
 	var modifier string
215 215
 	if b.DryRun {
216 216
 		run.Op = NoOp
217
-		modifier = " (DRY RUN)"
217
+		modifier = " (dry run)"
218 218
 	}
219 219
 
220 220
 	errs := run.Run(list, namespace)
221 221
new file mode 100755
... ...
@@ -0,0 +1,18 @@
0
+#!/bin/bash
1
+source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
2
+trap os::test::junit::reconcile_output EXIT
3
+
4
+# Cleanup cluster resources created by this test
5
+(
6
+  set +e
7
+  oc delete all,templates --all
8
+  exit 0
9
+) &>/dev/null
10
+
11
+
12
+os::test::junit::declare_suite_start "cmd/create"
13
+# validate --dry-run outputs correct success message
14
+os::cmd::expect_success_and_text 'oc create quota quota --dry-run' 'resourcequota "quota" created \(dry run\)'
15
+
16
+echo "oc create: ok"
17
+os::test::junit::declare_suite_end
0 18
\ No newline at end of file
... ...
@@ -15,11 +15,11 @@ os::test::junit::declare_suite_start "cmd/migrate"
15 15
 os::cmd::expect_success 'oc login -u system:admin'
16 16
 
17 17
 os::test::junit::declare_suite_start "cmd/migrate/storage"
18
-os::cmd::expect_success_and_text     'oadm migrate storage' 'summary \(DRY RUN\)'
19
-os::cmd::expect_success_and_text     'oadm migrate storage --loglevel=2' 'migrated \(DRY RUN\): serviceaccounts/deployer'
20
-os::cmd::expect_success_and_not_text 'oadm migrate storage --loglevel=2 --include=pods' 'migrated \(DRY RUN\): serviceaccounts/deployer'
21
-os::cmd::expect_success_and_text     'oadm migrate storage --loglevel=2 --include=sa --from-key=default/ --to-key=default/\xFF' 'migrated \(DRY RUN\): serviceaccounts/deployer'
22
-os::cmd::expect_success_and_not_text 'oadm migrate storage --loglevel=2 --include=sa --from-key=default/ --to-key=default/deployer' 'migrated \(DRY RUN\): serviceaccounts/deployer'
18
+os::cmd::expect_success_and_text     'oadm migrate storage' 'summary \(dry run\)'
19
+os::cmd::expect_success_and_text     'oadm migrate storage --loglevel=2' 'migrated \(dry run\): serviceaccounts/deployer'
20
+os::cmd::expect_success_and_not_text 'oadm migrate storage --loglevel=2 --include=pods' 'migrated \(dry run\): serviceaccounts/deployer'
21
+os::cmd::expect_success_and_text     'oadm migrate storage --loglevel=2 --include=sa --from-key=default/ --to-key=default/\xFF' 'migrated \(dry run\): serviceaccounts/deployer'
22
+os::cmd::expect_success_and_not_text 'oadm migrate storage --loglevel=2 --include=sa --from-key=default/ --to-key=default/deployer' 'migrated \(dry run\): serviceaccounts/deployer'
23 23
 os::cmd::expect_success_and_text     'oadm migrate storage --loglevel=2 --confirm' 'unchanged:'
24 24
 os::test::junit::declare_suite_end
25 25
 
... ...
@@ -45,7 +45,7 @@ os::cmd::expect_failure_and_text     'oadm migrate image-references a/b=a/b --lo
45 45
 os::cmd::expect_failure_and_text     'oadm migrate image-references */*=*/* --loglevel=1' 'at least one change'
46 46
 # verify dry run
47 47
 os::cmd::expect_success_and_text     'oadm migrate image-references my.docker.io/*=docker.io/* --loglevel=1' 'migrated=0'
48
-os::cmd::expect_success_and_text     'oadm migrate image-references --include=imagestreams docker.io/*=my.docker.io/* --loglevel=1' 'migrated \(DRY RUN\): imagestreams/test -n '
48
+os::cmd::expect_success_and_text     'oadm migrate image-references --include=imagestreams docker.io/*=my.docker.io/* --loglevel=1' 'migrated \(dry run\): imagestreams/test -n '
49 49
 os::cmd::expect_success_and_text     'oadm migrate image-references --include=imagestreams docker.io/mysql=my.docker.io/* --all-namespaces=false --loglevel=1' 'migrated=1'
50 50
 os::cmd::expect_success_and_text     'oadm migrate image-references --include=imagestreams docker.io/mysql=my.docker.io/* --all-namespaces=false --loglevel=1 -o yaml' 'dockerImageReference: my.docker.io/mysql@sha256:'
51 51
 os::cmd::expect_success_and_text     'oadm migrate image-references --include=imagestreams docker.io/other=my.docker.io/* --all-namespaces=false --loglevel=1' 'migrated=0'
... ...
@@ -67,7 +67,7 @@ os::cmd::expect_failure_and_text 'oadm ipfailover --dry-run' 'you must specify a
67 67
 os::cmd::expect_failure_and_text 'oadm ipfailover --virtual-ips="1.2.3.4" --dry-run' 'error: ipfailover could not be created'
68 68
 os::cmd::expect_success 'oadm policy add-scc-to-user privileged -z ipfailover'
69 69
 os::cmd::expect_success_and_text 'oadm ipfailover --virtual-ips="1.2.3.4" --dry-run' 'Creating IP failover'
70
-os::cmd::expect_success_and_text 'oadm ipfailover --virtual-ips="1.2.3.4" --dry-run' 'Success \(DRY RUN\)'
70
+os::cmd::expect_success_and_text 'oadm ipfailover --virtual-ips="1.2.3.4" --dry-run' 'Success \(dry run\)'
71 71
 os::cmd::expect_success_and_text 'oadm ipfailover --virtual-ips="1.2.3.4" --dry-run -o yaml' 'name: ipfailover'
72 72
 os::cmd::expect_success_and_text 'oadm ipfailover --virtual-ips="1.2.3.4" --dry-run -o name' 'deploymentconfig/ipfailover'
73 73
 os::cmd::expect_success_and_text 'oadm ipfailover --virtual-ips="1.2.3.4" --dry-run -o yaml' '1.2.3.4'