mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
test(credential): assert the post-adopt read path too, per Greptile P2
The GET case only matched on method, so a broken by_name/model_id read-back after a successful adopt would have gone unnoticed.
This commit is contained in:
parent
d0fb841c84
commit
1b201cf0d4
1 changed files with 3 additions and 0 deletions
|
|
@ -226,6 +226,9 @@ func conflictServer(t *testing.T, patchStatus int, patchBody string) (*httptest.
|
|||
w.WriteHeader(patchStatus)
|
||||
w.Write([]byte(patchBody))
|
||||
case r.Method == http.MethodGet:
|
||||
if r.URL.Path != "/credentials/by_name/conflict-test" || r.URL.Query().Get("model_id") != "model-1" {
|
||||
t.Errorf("GET went to %q (query %q), want /credentials/by_name/conflict-test?model_id=model-1", r.URL.Path, r.URL.RawQuery)
|
||||
}
|
||||
resp := CredentialResponse{CredentialName: "conflict-test", CredentialInfo: map[string]interface{}{}}
|
||||
body, _ := json.Marshal(resp)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue