fix(macos): restore swift test build
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
@_exported import Logging
|
@_exported import Logging
|
||||||
import Foundation
|
import Foundation
|
||||||
import OSLog
|
import OSLog
|
||||||
|
import os
|
||||||
|
|
||||||
typealias Logger = Logging.Logger
|
typealias Logger = Logging.Logger
|
||||||
|
|
||||||
@@ -96,7 +97,7 @@ extension Logger.Message.StringInterpolation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct ClawdisOSLogHandler: LogHandler {
|
struct ClawdisOSLogHandler: LogHandler {
|
||||||
private let osLogger: OSLog.Logger
|
private let osLogger: os.Logger
|
||||||
var metadata: Logger.Metadata = [:]
|
var metadata: Logger.Metadata = [:]
|
||||||
|
|
||||||
var logLevel: Logger.Level {
|
var logLevel: Logger.Level {
|
||||||
@@ -105,7 +106,7 @@ struct ClawdisOSLogHandler: LogHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init(subsystem: String, category: String) {
|
init(subsystem: String, category: String) {
|
||||||
self.osLogger = OSLog.Logger(subsystem: subsystem, category: category)
|
self.osLogger = os.Logger(subsystem: subsystem, category: category)
|
||||||
}
|
}
|
||||||
|
|
||||||
subscript(metadataKey key: String) -> Logger.Metadata.Value? {
|
subscript(metadataKey key: String) -> Logger.Metadata.Value? {
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ import Testing
|
|||||||
presence: [],
|
presence: [],
|
||||||
health: ClawdisProtocol.AnyCodable(["ok": ClawdisProtocol.AnyCodable(false)]),
|
health: ClawdisProtocol.AnyCodable(["ok": ClawdisProtocol.AnyCodable(false)]),
|
||||||
stateversion: StateVersion(presence: 1, health: 1),
|
stateversion: StateVersion(presence: 1, health: 1),
|
||||||
uptimems: 123)
|
uptimems: 123,
|
||||||
|
configpath: nil,
|
||||||
|
statedir: nil)
|
||||||
|
|
||||||
let hello = HelloOk(
|
let hello = HelloOk(
|
||||||
type: "hello",
|
type: "hello",
|
||||||
_protocol: 2,
|
_protocol: 2,
|
||||||
@@ -55,7 +58,7 @@ import Testing
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test func chatEventMapsToChat() {
|
@Test func chatEventMapsToChat() {
|
||||||
let payload: ClawdisProtocol.AnyCodable = ClawdisProtocol.AnyCodable([
|
let payload = ClawdisProtocol.AnyCodable([
|
||||||
"runId": ClawdisProtocol.AnyCodable("run-1"),
|
"runId": ClawdisProtocol.AnyCodable("run-1"),
|
||||||
"sessionKey": ClawdisProtocol.AnyCodable("main"),
|
"sessionKey": ClawdisProtocol.AnyCodable("main"),
|
||||||
"state": ClawdisProtocol.AnyCodable("final"),
|
"state": ClawdisProtocol.AnyCodable("final"),
|
||||||
|
|||||||
Reference in New Issue
Block a user