2025-12-17 17:01:10 +01:00
|
|
|
import { describe, expect, it, vi } from "vitest";
|
|
|
|
|
|
|
|
|
|
const { buildProgram } = await import("./program.js");
|
|
|
|
|
|
|
|
|
|
describe("dns cli", () => {
|
|
|
|
|
it("prints setup info (no apply)", async () => {
|
|
|
|
|
const log = vi.spyOn(console, "log").mockImplementation(() => {});
|
|
|
|
|
const program = buildProgram();
|
2026-01-30 03:15:10 +01:00
|
|
|
await program.parseAsync(["dns", "setup", "--domain", "openclaw.internal"], { from: "user" });
|
2026-01-21 05:20:31 +00:00
|
|
|
const output = log.mock.calls.map((call) => call.join(" ")).join("\n");
|
|
|
|
|
expect(output).toContain("DNS setup");
|
2026-01-30 03:15:10 +01:00
|
|
|
expect(output).toContain("openclaw.internal");
|
2025-12-17 17:01:10 +01:00
|
|
|
});
|
|
|
|
|
});
|