mirror of
https://github.com/floci-io/floci-cli.git
synced 2026-12-01 17:33:04 -05:00
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:
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");
|
||||
|
||||
Reference in new issue
Block a user