DockerController: refactor StartBackupContainerTest to show the stopping and starting state

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L.
2026-03-09 18:03:05 +01:00
parent 7922d38aa6
commit 7f394f5297
2 changed files with 10 additions and 4 deletions

View File

@@ -168,13 +168,19 @@ readonly class DockerController {
$this->configurationManager->instanceRestoreAttempt = false;
$this->configurationManager->commitTransaction();
// Get streaming response start and closure
$nonbufResp = $this->startStreamingResponse($response);
$addToStreamingResponseBody = $this->getAddToStreamingResponseBody($nonbufResp);
$id = self::TOP_CONTAINER;
$this->PerformRecursiveContainerStop($id);
$this->PerformRecursiveContainerStop($id, true, $addToStreamingResponseBody);
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
$this->PerformRecursiveContainerStart($id, true, $addToStreamingResponseBody);
return $response->withStatus(201)->withHeader('Location', '.');
// End streaming response
$this->finalizeStreamingResponse($nonbufResp);
return $nonbufResp;
}
public function StartContainer(Request $request, Response $response, array $args) : Response