fix(tests): update provider key handling in TestOwnerPrefixedIDs
- Modified the TestOwnerPrefixedIDs test to use ScopedKey for provider key generation, ensuring unique keys based on owner context. - This change enhances the accuracy of tests related to provider management by preventing key collisions during test execution.
This commit is contained in:
parent
960f47c238
commit
222daaf645
1 changed files with 2 additions and 1 deletions
|
|
@ -615,8 +615,9 @@ func TestOwnerPrefixedIDs(t *testing.T) {
|
||||||
|
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
t.Run(tc.key, func(t *testing.T) {
|
t.Run(tc.key, func(t *testing.T) {
|
||||||
|
scopedKey := llmprovider.ScopedKey(&tc.owner, tc.key)
|
||||||
p := llmprovider.Provider{
|
p := llmprovider.Provider{
|
||||||
Key: tc.key,
|
Key: scopedKey,
|
||||||
Name: tc.key,
|
Name: tc.key,
|
||||||
Type: "openai",
|
Type: "openai",
|
||||||
APIURL: "https://api.openai.com",
|
APIURL: "https://api.openai.com",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue