TestBareMode_UnsupportedEngineNoFlag verifies that engines not supporting bare mode do not inject any bare-mode flags in their execution steps.
(t *testing.T)
| 1126 | // TestBareMode_UnsupportedEngineNoFlag verifies that engines not supporting bare mode |
| 1127 | // do not inject any bare-mode flags in their execution steps. |
| 1128 | func TestBareMode_UnsupportedEngineNoFlag(t *testing.T) { |
| 1129 | t.Run("codex does not inject --no-system-prompt", func(t *testing.T) { |
| 1130 | workflowData := &WorkflowData{ |
| 1131 | Name: "test-workflow", |
| 1132 | EngineConfig: &EngineConfig{ |
| 1133 | ID: "codex", |
| 1134 | Bare: true, |
| 1135 | }, |
| 1136 | } |
| 1137 | |
| 1138 | engine := NewCodexEngine() |
| 1139 | steps := engine.GetExecutionSteps(workflowData, "/tmp/test.log") |
| 1140 | |
| 1141 | for _, step := range steps { |
| 1142 | for _, line := range step { |
| 1143 | assert.NotContains(t, line, "--no-system-prompt", |
| 1144 | "Codex should not inject --no-system-prompt (bare mode unsupported)") |
| 1145 | } |
| 1146 | } |
| 1147 | }) |
| 1148 | |
| 1149 | t.Run("gemini does not inject GEMINI_SYSTEM_MD=/dev/null", func(t *testing.T) { |
| 1150 | workflowData := &WorkflowData{ |
| 1151 | Name: "test-workflow", |
| 1152 | EngineConfig: &EngineConfig{ |
| 1153 | ID: "gemini", |
| 1154 | Bare: true, |
| 1155 | }, |
| 1156 | } |
| 1157 | |
| 1158 | engine := NewGeminiEngine() |
| 1159 | steps := engine.GetExecutionSteps(workflowData, "/tmp/test.log") |
| 1160 | |
| 1161 | for _, step := range steps { |
| 1162 | for _, line := range step { |
| 1163 | if strings.Contains(line, "GEMINI_SYSTEM_MD") && strings.Contains(line, "/dev/null") { |
| 1164 | t.Error("Gemini should not inject GEMINI_SYSTEM_MD=/dev/null (bare mode unsupported)") |
| 1165 | return |
| 1166 | } |
| 1167 | } |
| 1168 | } |
| 1169 | }) |
| 1170 | } |
| 1171 | |
| 1172 | // TestEngineMCPSessionTimeoutExtraction tests extraction of engine.mcp.session-timeout. |
| 1173 | func TestEngineMCPSessionTimeoutExtraction(t *testing.T) { |
nothing calls this directly
no test coverage detected