mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-09 04:35:21 +00:00
fix tests
This commit is contained in:
parent
dc04f41eb7
commit
5a67f93eae
@ -6,7 +6,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"reflect"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -497,7 +496,7 @@ func TestRetrieveMiddleware(t *testing.T) {
|
|||||||
"code": null,
|
"code": null,
|
||||||
"message": "model not found",
|
"message": "model not found",
|
||||||
"param": null,
|
"param": null,
|
||||||
"type": "api_error"
|
"type": "invalid_request_error"
|
||||||
}
|
}
|
||||||
}`,
|
}`,
|
||||||
},
|
},
|
||||||
@ -525,8 +524,8 @@ func TestRetrieveMiddleware(t *testing.T) {
|
|||||||
t.Fatalf("failed to unmarshal actual response: %v", err)
|
t.Fatalf("failed to unmarshal actual response: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !reflect.DeepEqual(expected, actual) {
|
if diff := cmp.Diff(expected, actual); diff != "" {
|
||||||
t.Errorf("responses did not match\nExpected: %+v\nActual: %+v", expected, actual)
|
t.Errorf("responses did not match (-want +got):\n%s", diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user