cmd/utils, test/system: Tweak an error message for consistency

Barring the first line, all other lines are terminated with a full stop
elsewhere.

https://github.com/containers/toolbox/pull/1099
This commit is contained in:
Debarshi Ray 2022-08-02 16:34:18 +02:00
parent 59f71219b7
commit 4f78c5ef86
2 changed files with 3 additions and 3 deletions

View file

@ -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()

View file

@ -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."
}
@ -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."
}