(t *testing.T)
| 778 | } |
| 779 | |
| 780 | func TestE2E_ShellModule_Ls_Windows(t *testing.T) { |
| 781 | mgr := sessions.NewManager(10 * time.Minute) |
| 782 | origGlobal := swapGlobalManager(mgr) |
| 783 | defer swapGlobalManager(origGlobal) |
| 784 | |
| 785 | b, stream, sess := setupTestBridge(t, mgr, "codex_cli_rs/0.112.0 (Windows 10.0.26200; x86_64)", testClaudeTools) |
| 786 | |
| 787 | spite := &implantpb.Spite{ |
| 788 | Name: consts.ModuleLs, |
| 789 | Body: &implantpb.Spite_Request{Request: &implantpb.Request{ |
| 790 | Args: []string{`D:\Programing\AI\CLIProxyAPI`}, |
| 791 | }}, |
| 792 | } |
| 793 | |
| 794 | b.taskManager.StartSessionListener(sess.ID) |
| 795 | simulateToolResult(mgr, sess.ID, 30, wrapToolOutput(windowsDirOutput), 50*time.Millisecond) |
| 796 | dispatchWithTimeout(t, b, sess.ID, 30, spite, 3*time.Second) |
| 797 | |
| 798 | sent := stream.getSent() |
| 799 | if len(sent) == 0 { |
| 800 | t.Fatal("expected SpiteResponse") |
| 801 | } |
| 802 | |
| 803 | last := sent[len(sent)-1] |
| 804 | lr := last.Spite.GetLsResponse() |
| 805 | if lr == nil { |
| 806 | t.Fatal("expected LsResponse body") |
| 807 | } |
| 808 | if !lr.Exists { |
| 809 | t.Error("expected Exists=true") |
| 810 | } |
| 811 | if len(lr.Files) == 0 { |
| 812 | t.Error("expected non-empty file list") |
| 813 | } |
| 814 | } |
nothing calls this directly
no test coverage detected