mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +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
734 B
Swift
25 lines
734 B
Swift
import Darwin
|
|
import Foundation
|
|
import Testing
|
|
@testable import Hanzo Bot
|
|
|
|
struct LogLocatorTests {
|
|
@Test func `launchd gateway log path ensures tmp dir exists`() {
|
|
let fm = FileManager()
|
|
let baseDir = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true)
|
|
let logDir = baseDir.appendingPathComponent("openclaw-tests-\(UUID().uuidString)")
|
|
|
|
setenv("BOT_LOG_DIR", logDir.path, 1)
|
|
defer {
|
|
unsetenv("BOT_LOG_DIR")
|
|
try? fm.removeItem(at: logDir)
|
|
}
|
|
|
|
_ = LogLocator.launchdGatewayLogPath
|
|
|
|
var isDir: ObjCBool = false
|
|
#expect(fm.fileExists(atPath: logDir.path, isDirectory: &isDir))
|
|
#expect(isDir.boolValue == true)
|
|
}
|
|
}
|