(t *testing.T)
| 140 | } |
| 141 | |
| 142 | func TestMaxIterationsAutoApproveInYoloMode(t *testing.T) { |
| 143 | t.Parallel() |
| 144 | |
| 145 | rt := &mockRuntime{ |
| 146 | events: []runtime.Event{maxIterEvent(60)}, |
| 147 | } |
| 148 | |
| 149 | var buf bytes.Buffer |
| 150 | out := NewPrinter(&buf) |
| 151 | sess := session.New() |
| 152 | cfg := Config{AutoApprove: true} |
| 153 | |
| 154 | err := Run(t.Context(), out, cfg, rt, sess, []string{"hello"}) |
| 155 | assert.NilError(t, err) |
| 156 | |
| 157 | resumes := rt.getResumes() |
| 158 | assert.Equal(t, len(resumes), 1) |
| 159 | assert.Equal(t, resumes[0].Type, runtime.ResumeTypeApprove) |
| 160 | } |
| 161 | |
| 162 | func TestMaxIterationsAutoApproveSafetyCap(t *testing.T) { |
| 163 | t.Parallel() |
nothing calls this directly
no test coverage detected