fix(thothctl): harden Pi restart recovery
This commit is contained in:
@@ -1001,6 +1001,9 @@ func (f *fakeRunner) Run(_ context.Context, args []string, _ io.Reader) (compose
|
||||
}
|
||||
return compose.Result{Stdout: `{"active":false,"admissions":0}`}, nil
|
||||
case strings.Contains(call, "/internal/maintenance/status"):
|
||||
if f.fail == "maintenance-proof" && f.recreated {
|
||||
return compose.Result{Stdout: fmt.Sprintf(`{"active":%t,"admissions":0,"recoveryRequired":true}`, f.maintenance)}, nil
|
||||
}
|
||||
if f.fail == "maintenance-activate-durability" {
|
||||
return compose.Result{Stdout: fmt.Sprintf(`{"active":%t,"admissions":0,"recoveryRequired":true}`, f.maintenance)}, nil
|
||||
}
|
||||
@@ -1078,7 +1081,7 @@ func (f *fakeRunner) Run(_ context.Context, args []string, _ io.Reader) (compose
|
||||
f.maintenance = false
|
||||
f.dropMaintenanceAfterCandidate = false
|
||||
}
|
||||
if f.fail == "recreate" && f.currentImage == "sha256:candidate" {
|
||||
if f.fail == "recreate" && (f.built || f.recreated) {
|
||||
return compose.Result{ExitCode: 54}, errors.New("recreate failure")
|
||||
}
|
||||
if f.fail == "compensation" && f.rollbackPrepared {
|
||||
|
||||
Reference in New Issue
Block a user