* fix(ci): skip unrelated required checks cleanly Matrix jobs had to start no-op runners to preserve interpolated required-check names. Static named jobs let GitHub report genuine skipped conclusions while keeping those names stable. * fix(ci): gate changes to install patching script * fix(ci): route cross-package test contracts narrowly * fix(ci): keep routed contracts merge-blocking * fix(server): exclude nested test utilities from builds * fix(ci): cover app-owned native and browser domains * refactor(ci): align tests with runtime domains Own browser specs, desktop specs, and Electron-only app code by stable directories so PR routing does not depend on filename conventions. Keep desktop integration coverage inside the required desktop check. * fix(ci): keep routing and desktop suites isolated The routing regression must run before dependency installation, and desktop Vitest must not collect Playwright-owned specs. * fix(ci): isolate desktop e2e runtime * perf(test): isolate Playwright workers * perf(test): parallelize Playwright within specs * fix(test): keep Playwright file scheduling * fix(test): share dynamic Metro fixture * fix(test): preserve own-host restart fixtures * fix(ci): preserve routed contracts after rebase * Stabilize Playwright wheel-scroll assertions
74 lines
2.6 KiB
TypeScript
74 lines
2.6 KiB
TypeScript
#!/usr/bin/env npx tsx
|
|
|
|
import assert from "node:assert";
|
|
import { runLocalPaseo } from "./helpers/local-cli.ts";
|
|
import { startTestDaemon } from "./helpers/test-daemon.ts";
|
|
|
|
console.log("=== Daemon Status Auth ===\n");
|
|
|
|
const daemon = await startTestDaemon({
|
|
env: { PASEO_PASSWORD: "shared-secret" },
|
|
});
|
|
|
|
try {
|
|
{
|
|
console.log("Test 1: status reports password requirement without marking daemon unreachable");
|
|
const result = await runLocalPaseo(["daemon", "status", "--json"], {
|
|
PASEO_HOME: daemon.paseoHome,
|
|
PASEO_HOST: "",
|
|
PASEO_PASSWORD: "",
|
|
});
|
|
|
|
assert.strictEqual(result.exitCode, 0, "status should still succeed");
|
|
const status = JSON.parse(result.stdout);
|
|
|
|
assert.strictEqual(status.localDaemon, "running");
|
|
assert.strictEqual(status.connectedDaemon, "auth_required");
|
|
assert(!("runningAgents" in status), "status should not fetch agent counts");
|
|
assert(!("idleAgents" in status), "status should not fetch agent counts");
|
|
assert.match(status.note, /requires a password/i);
|
|
assert.doesNotMatch(status.note, /not reachable/i);
|
|
console.log("✓ missing password reports auth_required\n");
|
|
}
|
|
|
|
{
|
|
console.log("Test 2: status reports rejected supplied password separately");
|
|
const result = await runLocalPaseo(["daemon", "status", "--json"], {
|
|
PASEO_HOME: daemon.paseoHome,
|
|
PASEO_HOST: "",
|
|
PASEO_PASSWORD: "wrong-secret",
|
|
});
|
|
|
|
assert.strictEqual(result.exitCode, 0, "status should still succeed");
|
|
const status = JSON.parse(result.stdout);
|
|
|
|
assert.strictEqual(status.localDaemon, "running");
|
|
assert.strictEqual(status.connectedDaemon, "auth_failed");
|
|
assert.match(status.note, /password was rejected/i);
|
|
assert.doesNotMatch(status.note, /not reachable/i);
|
|
console.log("✓ wrong password reports auth_failed\n");
|
|
}
|
|
|
|
{
|
|
console.log("Test 3: status reaches the same daemon when password is supplied");
|
|
const result = await runLocalPaseo(["daemon", "status", "--json"], {
|
|
PASEO_HOME: daemon.paseoHome,
|
|
PASEO_HOST: "",
|
|
PASEO_PASSWORD: "shared-secret",
|
|
});
|
|
|
|
assert.strictEqual(result.exitCode, 0, "status should succeed with password");
|
|
const status = JSON.parse(result.stdout);
|
|
|
|
assert.strictEqual(status.localDaemon, "running");
|
|
assert.strictEqual(status.connectedDaemon, "reachable");
|
|
assert(!("runningAgents" in status), "status should not fetch agent counts");
|
|
assert(!("idleAgents" in status), "status should not fetch agent counts");
|
|
console.log("✓ password-authenticated status remains reachable\n");
|
|
}
|
|
} finally {
|
|
await daemon.stop();
|
|
}
|
|
|
|
console.log("=== Daemon Status Auth Tests Passed ===");
|