Skip to content

Commit

Permalink
Merge pull request #20778 from coreydaley/bugzilla_1622920_remove_cou…
Browse files Browse the repository at this point in the history
…nt_from_error_message

Remove count from new-build/new-app error message
  • Loading branch information
openshift-merge-robot authored Aug 28, 2018
2 parents ae86f05 + bcc875c commit 79faa47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/oc/lib/newapp/app/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type ErrMultipleMatches struct {
}

func (e ErrMultipleMatches) Error() string {
return fmt.Sprintf("multiple images or templates matched %q: %d", e.Value, len(e.Matches))
return fmt.Sprintf("multiple images or templates matched %q", e.Value)
}

// ErrNameRequired is the error returned by new-app when a name cannot be
Expand Down
2 changes: 1 addition & 1 deletion test/cmd/newapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ os::cmd::expect_success_and_text 'oc new-build --binary --image=ruby --strategy=
os::cmd::expect_success 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run'
# when latest does not exist, there are multiple partial matches (2.2, 2.3, 2.4, 2.5)
os::cmd::expect_success 'oc delete imagestreamtag ruby:latest'
os::cmd::expect_failure_and_text 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run' 'error: multiple images or templates matched \"ruby\":'
os::cmd::expect_failure_and_text 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run' 'error: multiple images or templates matched \"ruby\"'
# when only 2.5 exists, there is a single partial match (2.5)
os::cmd::expect_success 'oc delete imagestreamtag ruby:2.2'
os::cmd::expect_success 'oc delete imagestreamtag ruby:2.3'
Expand Down

0 comments on commit 79faa47

Please sign in to comment.