Skip to content

test: add macOS bash integration tests#77

Merged
s2005 merged 6 commits intomainfrom
feature/add-macos-integration-tests
Feb 15, 2026
Merged

test: add macOS bash integration tests#77
s2005 merged 6 commits intomainfrom
feature/add-macos-integration-tests

Conversation

@s2005
Copy link
Copy Markdown
Owner

@s2005 s2005 commented Feb 15, 2026

Added macOS integration tests using bash shell.

Test results: 774 passed, 4 skipped, 6 failed

The tests cover:

  • Unix path validation (/tmp, Windows paths rejected)
  • macOS command blocking (rm -rf /, dd, mkfs, diskutil)
  • Working directory restrictions
  • Safe commands

Note: TestCLIServer has a bug where bash shell configuration is incomplete on macOS. The complex macosBashAuto.test.ts was simplified to macosBashSimple.test.ts which tests the core functionality.

Note: Tests use 'bash' shell directly instead of 'bash_auto' because TestCLIServer has a bug where bash shell config is expected to have wslConfig, but bash now properly uses Unix paths without wslConfig. This reveals an existing issue in CLIServer.executeShellCommand that needs to be fixed separately.

Tests cover:
- Unix path validation (/Users, /tmp, relative paths, Windows paths rejected)
- macOS command blocking (rm -rf /, dd, mkfs, diskutil, safe commands)
- Working directory restrictions (allowed vs disallowed paths)
- Operator blocking (&& chaining allowed/disabled)
- Initial directory support
@s2005
Copy link
Copy Markdown
Owner Author

s2005 commented Feb 15, 2026

Update after latest fixes:

What was adjusted:

  • Gated native bash test suites on Windows runners:
    • tests/integration/macosBashAuto.test.ts now runs only on macOS (darwin).
    • tests/bash/bashShell.test.ts now skips on Windows (win32).
  • Stabilized WSL /tmp working-dir validation test:
    • tests/wsl.test.ts Test 5.1.1 now uses pwd (instead of ls) and asserts path metadata/output deterministically.

Validation performed locally before push:

  • npm test -- tests/bash/bashShell.test.ts tests/integration/macosBashAuto.test.ts tests/wsl.test.ts

This reflects the intended maintenance model: platform-specific native shell tests are runner-gated, while shared WSL behavior remains covered cross-platform.

@s2005 s2005 merged commit a09298c into main Feb 15, 2026
3 checks passed
@s2005 s2005 deleted the feature/add-macos-integration-tests branch February 15, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant