Skip to content

Commit

Permalink
cmd/utils, test/system: Tweak an error message for consistency
Browse files Browse the repository at this point in the history
Barring the first line, all other lines are terminated with a full stop
elsewhere.

containers#937
  • Loading branch information
debarshiray committed Aug 31, 2022
1 parent 55a5a77 commit c1c8fea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func createErrorContainerNotFound(container string) error {
func createErrorInvalidContainer(containerArg string) error {
var builder strings.Builder
fmt.Fprintf(&builder, "invalid argument for '%s'\n", containerArg)
fmt.Fprintf(&builder, "Container names must match '%s'\n", utils.ContainerNameRegexp)
fmt.Fprintf(&builder, "Container names must match '%s'.\n", utils.ContainerNameRegexp)
fmt.Fprintf(&builder, "Run '%s --help' for usage.", executableBase)

errMsg := builder.String()
Expand Down
4 changes: 2 additions & 2 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ teardown() {

assert_failure
assert_line --index 0 "Error: invalid argument for 'CONTAINER'"
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'"
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'."
assert_line --index 2 "Run 'toolbox --help' for usage."
}

Expand All @@ -52,7 +52,7 @@ teardown() {

assert_failure
assert_line --index 0 "Error: invalid argument for '--container'"
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'"
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'."
assert_line --index 2 "Run 'toolbox --help' for usage."
}

Expand Down

0 comments on commit c1c8fea

Please sign in to comment.