From d07781ceebc60438de5b77b20d59dc093551ad5d Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 30 Jan 2026 20:57:11 +0800 Subject: [PATCH] Update Command Test to Reflect New Command Structure - Adjusted assertions in the command test to verify the updated command structure, which now begins with "bash" and includes specific flags for executing CCR commands. - Enhanced the test to ensure the user prompt is correctly included in the command, improving the accuracy of the test verification. --- agent/sandbox/claude/command_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/sandbox/claude/command_test.go b/agent/sandbox/claude/command_test.go index 180f4ca2..32a9612a 100644 --- a/agent/sandbox/claude/command_test.go +++ b/agent/sandbox/claude/command_test.go @@ -24,8 +24,10 @@ func TestBuildCommand(t *testing.T) { require.NoError(t, err) // Verify command structure - assert.Equal(t, "ccr-run", cmd[0]) - assert.Contains(t, cmd, "Hello") // User prompt should be in command + // Command is now: ["bash", "-c", "nohup ccr start ... ; ccr code ... -p \"prompt\""] + assert.Equal(t, "bash", cmd[0]) + assert.Equal(t, "-c", cmd[1]) + assert.Contains(t, cmd[2], "Hello") // User prompt should be in bash command // Verify environment variables assert.Equal(t, "https://api.example.com", env["CCR_API_BASE"])