Update Sandbox Integration Test to Reflect Command Structure Changes

- Modified the command verification in the sandbox integration test to assert the new command structure, which now starts with "bash" and includes specific arguments for executing CCR commands.
- Enhanced assertions to check for the presence of required command components, improving the robustness of the test.
This commit is contained in:
Max 2026-01-30 20:09:28 +08:00
parent c1e92b726d
commit e160f304b1

View file

@ -78,8 +78,12 @@ func TestClaudeCommandBuilding(t *testing.T) {
require.NoError(t, err)
// Verify command structure
// Command is now: ["bash", "-c", "nohup ccr start ... && ccr code ..."]
assert.NotEmpty(t, cmd)
assert.Equal(t, "ccr-run", cmd[0], "Command should start with ccr-run")
assert.Equal(t, "bash", cmd[0], "Command should start with bash")
assert.Equal(t, "-c", cmd[1], "Second arg should be -c")
assert.Contains(t, cmd[2], "ccr code", "Bash command should contain ccr code")
assert.Contains(t, cmd[2], "--permission-mode", "Should include permission mode")
t.Logf("Built command: %v", cmd)
// Verify environment variables