Files
clawdbot/apps/macos/Tests/ClawdbotIPCTests/GatewayConnectionControlTests.swift
2026-01-04 14:38:51 +00:00

23 lines
757 B
Swift

import Testing
@testable import Clawdbot
@testable import ClawdbotIPC
@Suite(.serialized) struct GatewayConnectionControlTests {
@Test func statusFailsWhenProcessMissing() async {
let result = await GatewayConnection.shared.status()
// We don't assert ok because the worker may not be available in CI.
// Instead, ensure the call returns without throwing and provides a message.
#expect(result.ok == true || result.error != nil)
}
@Test func rejectEmptyMessage() async {
let result = await GatewayConnection.shared.sendAgent(
message: "",
thinking: nil,
sessionKey: "main",
deliver: false,
to: nil)
#expect(result.ok == false)
}
}