mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-31 03:41:51 +00:00
feat(cli): support targeting running containerized openclaw instances (#52651)
Signed-off-by: sallyom <somalley@redhat.com>
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user