Merge pull request #1619 from jmorganca/mxyng/fix-version-test
fix(test): use real version string for comparison
This commit is contained in:
commit
23dc179350
1 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ import (
|
||||||
|
|
||||||
"github.com/jmorganca/ollama/api"
|
"github.com/jmorganca/ollama/api"
|
||||||
"github.com/jmorganca/ollama/parser"
|
"github.com/jmorganca/ollama/parser"
|
||||||
|
"github.com/jmorganca/ollama/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setupServer(t *testing.T) (*Server, error) {
|
func setupServer(t *testing.T) (*Server, error) {
|
||||||
|
@ -71,7 +72,7 @@ func Test_Routes(t *testing.T) {
|
||||||
assert.Equal(t, contentType, "application/json; charset=utf-8")
|
assert.Equal(t, contentType, "application/json; charset=utf-8")
|
||||||
body, err := io.ReadAll(resp.Body)
|
body, err := io.ReadAll(resp.Body)
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
assert.Equal(t, `{"version":"0.0.0"}`, string(body))
|
assert.Equal(t, fmt.Sprintf(`{"version":"%s"}`, version.Version), string(body))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue