test: isolate heartbeat runner tests from user workspace

This commit is contained in:
Tyler Yust 2026-01-26 16:27:13 -08:00
parent 6f61e2dd84
commit e52472c955

View File

@ -333,6 +333,7 @@ describe("runHeartbeatOnce", () => {
const cfg: ClawdbotConfig = { const cfg: ClawdbotConfig = {
agents: { agents: {
defaults: { defaults: {
workspace: tmpDir,
heartbeat: { every: "5m", target: "whatsapp" }, heartbeat: { every: "5m", target: "whatsapp" },
}, },
}, },
@ -461,6 +462,7 @@ describe("runHeartbeatOnce", () => {
const cfg: ClawdbotConfig = { const cfg: ClawdbotConfig = {
agents: { agents: {
defaults: { defaults: {
workspace: tmpDir,
heartbeat: { heartbeat: {
every: "5m", every: "5m",
target: "last", target: "last",
@ -542,6 +544,7 @@ describe("runHeartbeatOnce", () => {
const cfg: ClawdbotConfig = { const cfg: ClawdbotConfig = {
agents: { agents: {
defaults: { defaults: {
workspace: tmpDir,
heartbeat: { every: "5m", target: "whatsapp" }, heartbeat: { every: "5m", target: "whatsapp" },
}, },
}, },
@ -597,6 +600,7 @@ describe("runHeartbeatOnce", () => {
const cfg: ClawdbotConfig = { const cfg: ClawdbotConfig = {
agents: { agents: {
defaults: { defaults: {
workspace: tmpDir,
heartbeat: { heartbeat: {
every: "5m", every: "5m",
target: "whatsapp", target: "whatsapp",
@ -668,6 +672,7 @@ describe("runHeartbeatOnce", () => {
const cfg: ClawdbotConfig = { const cfg: ClawdbotConfig = {
agents: { agents: {
defaults: { defaults: {
workspace: tmpDir,
heartbeat: { heartbeat: {
every: "5m", every: "5m",
target: "whatsapp", target: "whatsapp",
@ -737,7 +742,7 @@ describe("runHeartbeatOnce", () => {
try { try {
const cfg: ClawdbotConfig = { const cfg: ClawdbotConfig = {
agents: { agents: {
defaults: { heartbeat: { every: "5m" } }, defaults: { workspace: tmpDir, heartbeat: { every: "5m" } },
list: [{ id: "work", default: true }], list: [{ id: "work", default: true }],
}, },
channels: { whatsapp: { allowFrom: ["*"] } }, channels: { whatsapp: { allowFrom: ["*"] } },