Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/cli/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func TestRunCommand_RejectsNegativeMaxResources(t *testing.T) {

// useFakeOpenshell prepends testdata/ to PATH so the stub openshell binary
// is found instead of a real installation, causing tests to fail fast at
// sandbox.EnsureAvailable instead of actually running agents.
// sandbox.CheckGateway instead of actually running agents.
func useFakeOpenshell(t *testing.T) {
t.Helper()
testdataDir, err := filepath.Abs("testdata")
Expand All @@ -155,8 +155,8 @@ func useFakeOpenshell(t *testing.T) {
func TestRunAgent_HarnessLoadPipeline(t *testing.T) {
// Exercises the early runAgent pipeline: absFullsendDir, policy,
// org config loading, LoadWithBase, baseDeps, ResolveRelativeTo.
// The function fails later at sandbox.EnsureAvailable (no openshell
// in test env), but by then all harness-loading code paths are covered.
// The function fails later at sandbox.CheckGateway (stub exits 1),
// but by then all harness-loading code paths are covered.
useFakeOpenshell(t)
dir := t.TempDir()
require.NoError(t, os.MkdirAll(filepath.Join(dir, "harness"), 0o755))
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/testdata/openshell
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# Fake openshell that always fails — used by TestRunAgent_* tests to prevent
# real sandbox execution. Tests expect to fail at sandbox.EnsureAvailable.
# real sandbox execution. Tests expect to fail at sandbox.CheckGateway.
echo "fake openshell stub for tests" >&2
exit 1
Loading