Skip to content

Commit c805d09

Browse files
author
Anubhav200311
committed
deduplicate test
1 parent 528a4b3 commit c805d09

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

pkg/agent/agent_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,21 @@ func TestAgentTools(t *testing.T) {
7575
wantToolCount: 0,
7676
wantWarnings: 0,
7777
},
78+
{
79+
name: "duplicate tool names are deduplicated",
80+
toolsets: []tools.ToolSet{
81+
newStubToolSet(nil, []tools.Tool{
82+
{Name: "read_file", Parameters: map[string]any{}},
83+
{Name: "write_file", Parameters: map[string]any{}},
84+
}, nil),
85+
newStubToolSet(nil, []tools.Tool{
86+
{Name: "read_file", Parameters: map[string]any{}},
87+
{Name: "shell", Parameters: map[string]any{}},
88+
}, nil),
89+
},
90+
wantToolCount: 3,
91+
wantWarnings: 0,
92+
},
7893
}
7994

8095
for _, tt := range tests {

0 commit comments

Comments
 (0)