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
63aac0ed
Commit
63aac0ed
authored
Dec 19, 2023
by
Michael Yang
Browse files
fix(test): use real version string for comparison
parent
1ca484f6
Changes
1
Show 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 @
63aac0ed
...
@@ -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