Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
23dc1793
Unverified
Commit
23dc1793
authored
Dec 19, 2023
by
Michael Yang
Committed by
GitHub
Dec 19, 2023
Browse files
Merge pull request #1619 from jmorganca/mxyng/fix-version-test
fix(test): use real version string for comparison
parents
1ca484f6
63aac0ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
server/routes_test.go
server/routes_test.go
+2
-1
No files found.
server/routes_test.go
View file @
23dc1793
...
@@ -16,6 +16,7 @@ import (
...
@@ -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) {
...
@@ -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
))
},
},
},
},
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment