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
31 lines
837 B
Go
31 lines
837 B
Go
package runtimeprep
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestResolveCLICommandUsesStateRootShim(t *testing.T) {
|
|
stateDir := t.TempDir()
|
|
if err := os.MkdirAll(filepath.Join(stateDir, "bin"), 0o755); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if err := os.WriteFile(filepath.Join(stateDir, "bin", "tutti-dev"), []byte("#!/bin/sh\n"), 0o755); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if err := os.WriteFile(filepath.Join(stateDir, "bin", "tutti-connector-github"), []byte("#!/bin/sh\n"), 0o755); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if got := resolveCLICommand(stateDir); got != "tutti-dev" {
|
|
t.Fatalf("resolveCLICommand() = %q, want tutti-dev", got)
|
|
}
|
|
}
|
|
|
|
func TestResolveCLICommandDefaultsToProductionName(t *testing.T) {
|
|
if got := resolveCLICommand(t.TempDir()); got != "tutti" {
|
|
t.Fatalf("resolveCLICommand() = %q, want tutti", got)
|
|
}
|
|
}
|