diff --git a/checkpointctl.go b/checkpointctl.go index a7c15b3e..21f2eeba 100644 --- a/checkpointctl.go +++ b/checkpointctl.go @@ -90,7 +90,7 @@ func show(cmd *cobra.Command, args []string) error { showMounts = true } if fullPaths && !showMounts { - return fmt.Errorf("Cannot use --full-paths without --mounts/-all option") + return fmt.Errorf("Cannot use --full-paths without --mounts/--all option") } input := args[0] diff --git a/test/checkpointctl.bats b/test/checkpointctl.bats index 5e26cbd1..d56456dd 100644 --- a/test/checkpointctl.bats +++ b/test/checkpointctl.bats @@ -177,14 +177,14 @@ function teardown() { [[ ${lines[17]} == *"446571 us"* ]] } -@test "Run checkpointctl show with tar file and missing --mounts/-all and --full-paths" { +@test "Run checkpointctl show with tar file and missing --mounts/--all and --full-paths" { cp test/config.dump "$TEST_TMP_DIR1" cp test/spec.dump "$TEST_TMP_DIR1" mkdir "$TEST_TMP_DIR1"/checkpoint ( cd "$TEST_TMP_DIR1" && tar cf "$TEST_TMP_DIR2"/test.tar . ) checkpointctl show "$TEST_TMP_DIR2"/test.tar --full-paths [ "$status" -eq 1 ] - [[ ${lines[0]} == *"Error: Cannot use --full-paths without --mounts/-all option"* ]] + [[ ${lines[0]} == *"Error: Cannot use --full-paths without --mounts/--all option"* ]] } @test "Run checkpointctl show with tar file with valid config.dump and valid spec.dump (CRI-O) and no checkpoint directory" {