add allowed host middleware and remove workDir middleware (#3018)

This commit is contained in:
Jeffrey Morgan
2024-03-08 22:23:47 -08:00
committed by GitHub
parent ecc133d843
commit fc8c044584
2 changed files with 61 additions and 26 deletions

View File

@@ -21,12 +21,6 @@ import (
"github.com/jmorganca/ollama/version"
)
func setupServer(t *testing.T) (*Server, error) {
t.Helper()
return NewServer()
}
func Test_Routes(t *testing.T) {
type testCase struct {
Name string
@@ -207,9 +201,7 @@ func Test_Routes(t *testing.T) {
},
}
s, err := setupServer(t)
assert.Nil(t, err)
s := Server{}
router := s.GenerateRoutes()
httpSrv := httptest.NewServer(router)