Skip to content

Commit 6a7c265

Browse files
committed
FIX: harden remaining prompt smoke tests
1 parent 91a660f commit 6a7c265

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

test/smoke.bats

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,7 +2682,7 @@ EOF
26822682
make_openai_response_curl '{"choices":[{"message":{"content":"{\"cmd\":\"git checkout -b {{branch_name}}\",\"info\":\"creates and switches to the new git branch \\\"{{branch_name}}\\\"\",\"risk\":\"reversible change\"}"},"finish_reason":"stop"}]}'
26832683

26842684
run bash -lc '
2685-
printf "n\n" | env \
2685+
env \
26862686
HOME="'"$TEST_HOME"'" \
26872687
TMPDIR="'"$TEST_HOME"'/tmp" \
26882688
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -2793,7 +2793,7 @@ EOF
27932793
make_openai_response_curl '{"choices":[{"message":{"content":"{\"cmd\":\"rm -rf build\",\"info\":\"remove the build directory\",\"risk\":\"danger zone\"}"},"finish_reason":"stop"}]}'
27942794

27952795
run bash -lc '
2796-
printf "n\n" | env \
2796+
yes n | env \
27972797
HOME="'"$TEST_HOME"'" \
27982798
TMPDIR="'"$TEST_HOME"'/tmp" \
27992799
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -2865,7 +2865,7 @@ EOF
28652865
make_openai_response_curl '{"choices":[{"message":{"content":"{\"cmd\":\"printf amber > \\\"$HOME/amber-ran.txt\\\"\",\"info\":\"write amber output\",\"risk\":\"reversible change\"}"},"finish_reason":"stop"}]}'
28662866

28672867
run bash -lc '
2868-
printf "n\n" | env \
2868+
yes n | env \
28692869
HOME="'"$TEST_HOME"'" \
28702870
TMPDIR="'"$TEST_HOME"'/tmp" \
28712871
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -2939,7 +2939,7 @@ EOF
29392939
make_openai_response_curl '{"choices":[{"message":{"content":"{\"cmd\":\"printf dangerous > \\\"$HOME/danger-ran.txt\\\"\",\"info\":\"run the dangerous stub command\",\"risk\":\"danger zone\"}"},"finish_reason":"stop"}]}'
29402940

29412941
run bash -lc '
2942-
printf "n\n" | env \
2942+
yes n | env \
29432943
HOME="'"$TEST_HOME"'" \
29442944
TMPDIR="'"$TEST_HOME"'/tmp" \
29452945
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -2976,7 +2976,7 @@ EOF
29762976
make_openai_response_curl '{"choices":[{"message":{"content":"{\"cmd\":\"printf dangerous > \\\"$HOME/danger-ran.txt\\\"\",\"info\":\"run the dangerous stub command\",\"risk\":\"danger zone\"}"},"finish_reason":"stop"}]}'
29772977

29782978
run bash -lc '
2979-
printf "y\nn\n" | env \
2979+
{ printf "y\n"; yes n; } | env \
29802980
HOME="'"$TEST_HOME"'" \
29812981
TMPDIR="'"$TEST_HOME"'/tmp" \
29822982
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -3013,7 +3013,7 @@ EOF
30133013
make_openai_response_curl '{"choices":[{"message":{"content":"{\"cmd\":\"printf dangerous > \\\"$HOME/danger-ran.txt\\\"\",\"info\":\"run the dangerous stub command\",\"risk\":\"danger zone\"}"},"finish_reason":"stop"}]}'
30143014

30153015
run bash -lc '
3016-
printf "y\n" | env \
3016+
yes y | env \
30173017
HOME="'"$TEST_HOME"'" \
30183018
TMPDIR="'"$TEST_HOME"'/tmp" \
30193019
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -3043,6 +3043,7 @@ temp=0.1
30433043
tokens=500
30443044
share_command_results=true
30453045
result_lines=2
3046+
risk_appetite=2
30463047
exec_query=
30473048
question_query=
30483049
error_query=
@@ -3051,7 +3052,7 @@ EOF
30513052
make_result_command_curl
30523053

30533054
run bash -lc '
3054-
printf "y\n" | env \
3055+
env \
30553056
HOME="'"$TEST_HOME"'" \
30563057
TMPDIR="'"$TEST_HOME"'/tmp" \
30573058
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -3105,6 +3106,7 @@ temp=0.1
31053106
tokens=500
31063107
share_command_results=false
31073108
result_lines=2
3109+
risk_appetite=2
31083110
exec_query=
31093111
question_query=
31103112
error_query=
@@ -3113,7 +3115,7 @@ EOF
31133115
make_result_command_curl
31143116

31153117
run bash -lc '
3116-
printf "y\n" | env \
3118+
env \
31173119
HOME="'"$TEST_HOME"'" \
31183120
TMPDIR="'"$TEST_HOME"'/tmp" \
31193121
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -3494,6 +3496,7 @@ temp=0.1
34943496
tokens=500
34953497
share_command_results=true
34963498
result_lines=2.5
3499+
risk_appetite=2
34973500
exec_query=
34983501
question_query=
34993502
error_query=
@@ -3502,7 +3505,7 @@ EOF
35023505
make_result_command_curl
35033506

35043507
run bash -lc '
3505-
printf "y\n" | env \
3508+
env \
35063509
HOME="'"$TEST_HOME"'" \
35073510
TMPDIR="'"$TEST_HOME"'/tmp" \
35083511
PATH="'"$TEST_HOME"'/fakebin:$PATH" \
@@ -3542,7 +3545,7 @@ EOF
35423545
make_command_curl
35433546

35443547
run bash -lc '
3545-
printf "n\n" | env \
3548+
yes n | env \
35463549
HOME="'"$TEST_HOME"'" \
35473550
TMPDIR="'"$TEST_HOME"'/tmp" \
35483551
PATH="'"$TEST_HOME"'/fakebin:$PATH" \

0 commit comments

Comments
 (0)