Files
BrowserOS/packages/browseros-agent/tools/dev/cmd/watch_test.go
Nikhil 492f3fcdf2 feat(openclaw): prewarm ghcr image in vm (#887)
* feat(openclaw): add gateway image inspection

* feat(openclaw): pull gateway image from registry

* refactor(vm): decouple readiness from image cache

* refactor(openclaw): remove vm cache from runtime factory

* feat(openclaw): detect current gateway image

* feat(openclaw): prewarm vm runtime and reuse current gateway

* feat(openclaw): prewarm runtime on server startup

* refactor(vm): remove browseros image cache runtime

* refactor(build-tools): remove openclaw tarball pipeline

* chore: self-review fixes

* fix(openclaw): suppress prewarm pull progress logs

* fix(openclaw): address review feedback

* fix(openclaw): resolve review findings

* fix(dev): stop stale watch supervisors
2026-04-30 11:18:11 -07:00

39 lines
867 B
Go

package cmd
import (
"os"
"path/filepath"
"strings"
"testing"
)
func TestEnsureLimactlPresentMissingMessage(t *testing.T) {
t.Setenv("PATH", t.TempDir())
err := ensureLimactlPresent()
if err == nil {
t.Fatal("expected missing Lima error")
}
msg := err.Error()
if !strings.Contains(msg, "Lima is not installed.") {
t.Fatalf("expected missing Lima message, got %q", msg)
}
if !strings.Contains(msg, "brew install lima") {
t.Fatalf("expected brew install hint, got %q", msg)
}
}
func TestEnsureLimactlPresentFindsPathBinary(t *testing.T) {
binDir := t.TempDir()
limactlPath := filepath.Join(binDir, "limactl")
if err := os.WriteFile(limactlPath, []byte("#!/bin/sh\n"), 0o755); err != nil {
t.Fatal(err)
}
t.Setenv("PATH", binDir)
if err := ensureLimactlPresent(); err != nil {
t.Fatalf("expected limactl to resolve, got %v", err)
}
}