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.
This commit is contained in:
Hector Ventura committed 2026-10-10 17:39:37 -05:00
1 parent e3585ef39a
commit 250eddca25
1 file changed
+13 -1
@@ -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");