From 250eddca2566fc8dc5a58ed0ae178e007a1c6860 Mon Sep 17 00:00:00 2001 From: Hector Ventura Date: Sat, 10 Oct 2026 17:39:37 -0500 Subject: [PATCH] test(restart): let the recorded start answer restart's pre-stop checks The recording start used by the call-path tests was never parsed, so the new --pull validation rejected it. It now delegates the checks to the start restart really built. --- .../java/io/floci/cli/unit/RestartCommandTest.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/test/java/io/floci/cli/unit/RestartCommandTest.java b/src/test/java/io/floci/cli/unit/RestartCommandTest.java index ff15039..d5283ac 100644 --- a/src/test/java/io/floci/cli/unit/RestartCommandTest.java +++ b/src/test/java/io/floci/cli/unit/RestartCommandTest.java @@ -248,8 +248,20 @@ class RestartCommandTest { RestartCommand restart = new RestartCommand(ProductProfile.AWS, docker) { @Override public StartCommand buildStartCommand() throws DockerException { - super.buildStartCommand(); // the real one first, so its docker failure still surfaces + // The real one first, so its docker failure still surfaces; it also answers the + // checks restart runs before the stop, as only it carries the resolved settings. + StartCommand real = super.buildStartCommand(); return new StartCommand(ProductProfile.AWS) { + @Override + public String validationError() { + return real.validationError(); + } + + @Override + public String preparePersistDir() { + return real.preparePersistDir(); + } + @Override public Integer call() { ran.add("start");