Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
24 lines
777 B
Go
24 lines
777 B
Go
package agentruntime
|
|
|
|
import "testing"
|
|
|
|
func TestClaudeSDKSidecarProtocolNormalizesCurrentVersion(t *testing.T) {
|
|
request := claudeSDKSidecarRequest{Type: "exec"}
|
|
if err := request.normalize(); err != nil {
|
|
t.Fatalf("normalize: %v", err)
|
|
}
|
|
if request.Version != claudeSDKSidecarProtocolVersion {
|
|
t.Fatalf("version = %d, want %d", request.Version, claudeSDKSidecarProtocolVersion)
|
|
}
|
|
}
|
|
|
|
func TestClaudeSDKSidecarProtocolRejectsUnknownVersion(t *testing.T) {
|
|
request := claudeSDKSidecarRequest{Version: 1, Type: "exec"}
|
|
if err := request.normalize(); err == nil {
|
|
t.Fatal("normalize accepted unknown protocol version")
|
|
}
|
|
if err := (claudeSDKSidecarEvent{Version: 1, Type: "ok"}).validate(); err == nil {
|
|
t.Fatal("validate accepted unknown protocol version")
|
|
}
|
|
}
|