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
c60a0866
Unverified
Commit
c60a0866
authored
May 11, 2024
by
Daniel Hiltgen
Committed by
GitHub
May 11, 2024
Browse files
Merge pull request #4331 from dhiltgen/fix_unit
Fix envconfig unit test
parents
92ca2cca
824ee544
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
server/envconfig/config_test.go
server/envconfig/config_test.go
+4
-4
No files found.
server/envconfig/config_test.go
View file @
c60a0866
package
envconfig
import
(
"os"
"testing"
"github.com/stretchr/testify/require"
)
func
TestConfig
(
t
*
testing
.
T
)
{
os
.
Setenv
(
"OLLAMA_DEBUG"
,
""
)
Debug
=
false
// Reset whatever was loaded in init()
t
.
Setenv
(
"OLLAMA_DEBUG"
,
""
)
LoadConfig
()
require
.
False
(
t
,
Debug
)
os
.
Setenv
(
"OLLAMA_DEBUG"
,
"false"
)
t
.
Setenv
(
"OLLAMA_DEBUG"
,
"false"
)
LoadConfig
()
require
.
False
(
t
,
Debug
)
os
.
Setenv
(
"OLLAMA_DEBUG"
,
"1"
)
t
.
Setenv
(
"OLLAMA_DEBUG"
,
"1"
)
LoadConfig
()
require
.
True
(
t
,
Debug
)
}
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