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.
This commit is contained in:
parent
e160f304b1
commit
d07781ceeb
1 changed files with 4 additions and 2 deletions
|
|
@ -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"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue