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
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package managedruntime
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestResolvedRuntimeForRTKSaverProfileExposesOnlyRTK(t *testing.T) {
|
|
root := t.TempDir()
|
|
binDir := filepath.Join(root, "rtk", "bin")
|
|
if err := os.MkdirAll(binDir, 0o700); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
executable := filepath.Join(binDir, rtkBinaryName())
|
|
if err := os.WriteFile(executable, []byte("rtk"), 0o700); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
resolved, err := (DefaultResolver{Environ: func() []string {
|
|
return []string{"PATH=/host/bin"}
|
|
}}).resolvedRuntimeForComponents(root, []string{"rtk"})
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if resolved.RTK != executable || resolved.Node != "" || resolved.Python != "" {
|
|
t.Fatalf("resolved runtime = %#v", resolved)
|
|
}
|
|
if len(resolved.BinDirs) != 1 || resolved.BinDirs[0] != binDir {
|
|
t.Fatalf("RTK bin dirs = %#v", resolved.BinDirs)
|
|
}
|
|
if got := EnvValue(resolved.EnvOverrides, "TUTTI_APP_RTK"); got != executable {
|
|
t.Fatalf("TUTTI_APP_RTK = %q, want %q", got, executable)
|
|
}
|
|
if !appRuntimeComponentReady(root, "rtk") {
|
|
t.Fatal("prepared RTK component is not ready")
|
|
}
|
|
}
|