mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-01 07:38:30 +00:00
Automated rebrand of all openclaw references to hanzo bot: - Package: openclaw -> @hanzo/bot - Binary: openclaw -> hanzo-bot - Config: ~/.openclaw -> ~/.hanzo/bot - Docker: ghcr.io/hanzoai/bot - Env vars: OPENCLAW_* -> BOT_* - Bundle IDs: ai.hanzo.bot.* - Product name: Hanzo Bot
25 lines
973 B
Swift
25 lines
973 B
Swift
import Testing
|
|
@testable import Hanzo Bot
|
|
|
|
@Suite(.serialized)
|
|
struct GatewayAutostartPolicyTests {
|
|
@Test func `starts gateway only when local and not paused`() {
|
|
#expect(GatewayAutostartPolicy.shouldStartGateway(mode: .local, paused: false))
|
|
#expect(!GatewayAutostartPolicy.shouldStartGateway(mode: .local, paused: true))
|
|
#expect(!GatewayAutostartPolicy.shouldStartGateway(mode: .remote, paused: false))
|
|
#expect(!GatewayAutostartPolicy.shouldStartGateway(mode: .unconfigured, paused: false))
|
|
}
|
|
|
|
@Test func `ensures launch agent when local and not attach only`() {
|
|
#expect(GatewayAutostartPolicy.shouldEnsureLaunchAgent(
|
|
mode: .local,
|
|
paused: false))
|
|
#expect(!GatewayAutostartPolicy.shouldEnsureLaunchAgent(
|
|
mode: .local,
|
|
paused: true))
|
|
#expect(!GatewayAutostartPolicy.shouldEnsureLaunchAgent(
|
|
mode: .remote,
|
|
paused: false))
|
|
}
|
|
}
|