feat(cli): support targeting running containerized openclaw instances (#52651)

Signed-off-by: sallyom <somalley@redhat.com>
This commit is contained in:
Sally O'Malley
2026-03-24 10:17:17 -04:00
committed by GitHub
parent dd11bdd003
commit 91adc5e718
24 changed files with 1484 additions and 39 deletions

View File

@@ -67,6 +67,26 @@ describe("runServiceRestart token drift", () => {
stubEmptyGatewayEnv();
});
it("prints the container restart hint when restart is requested for a not-loaded service", async () => {
service.isLoaded.mockResolvedValue(false);
vi.stubEnv("OPENCLAW_CONTAINER_HINT", "openclaw-demo-container");
await runServiceRestart({
serviceNoun: "Gateway",
service,
renderStartHints: () => [
"Restart the container or the service that manages it for openclaw-demo-container.",
"openclaw gateway install",
],
opts: { json: false },
});
expect(runtimeLogs).toContain("Gateway service not loaded.");
expect(runtimeLogs).toContain(
"Start with: Restart the container or the service that manages it for openclaw-demo-container.",
);
});
it("emits drift warning when enabled", async () => {
await runServiceRestart(createServiceRunArgs(true));