Minimal tests for background job features
(t *testing.T)
| 202 | |
| 203 | // Minimal tests for background job features |
| 204 | func TestShellTool_RunBackgroundJob(t *testing.T) { |
| 205 | t.Parallel() |
| 206 | tool := New(nil, &config.RuntimeConfig{Config: config.Config{WorkingDir: t.TempDir()}}) |
| 207 | err := tool.Start(t.Context()) |
| 208 | require.NoError(t, err) |
| 209 | t.Cleanup(func() { |
| 210 | _ = tool.Stop(t.Context()) |
| 211 | }) |
| 212 | |
| 213 | result, err := tool.handler.RunShellBackground(t.Context(), RunShellBackgroundArgs{Cmd: "echo test"}) |
| 214 | require.NoError(t, err) |
| 215 | assert.Contains(t, result.Output, "Background job started with ID:") |
| 216 | } |
| 217 | |
| 218 | func TestShellTool_ListBackgroundJobs(t *testing.T) { |
| 219 | t.Parallel() |