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
824ee544
Commit
824ee544
authored
May 10, 2024
by
Daniel Hiltgen
Browse files
Fix envconfig unit test
parent
879e2caf
Changes
1
Show 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 @
824ee544
package
envconfig
package
envconfig
import
(
import
(
"os"
"testing"
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
)
)
func
TestConfig
(
t
*
testing
.
T
)
{
func
TestConfig
(
t
*
testing
.
T
)
{
os
.
Setenv
(
"OLLAMA_DEBUG"
,
""
)
Debug
=
false
// Reset whatever was loaded in init()
t
.
Setenv
(
"OLLAMA_DEBUG"
,
""
)
LoadConfig
()
LoadConfig
()
require
.
False
(
t
,
Debug
)
require
.
False
(
t
,
Debug
)
os
.
Setenv
(
"OLLAMA_DEBUG"
,
"false"
)
t
.
Setenv
(
"OLLAMA_DEBUG"
,
"false"
)
LoadConfig
()
LoadConfig
()
require
.
False
(
t
,
Debug
)
require
.
False
(
t
,
Debug
)
os
.
Setenv
(
"OLLAMA_DEBUG"
,
"1"
)
t
.
Setenv
(
"OLLAMA_DEBUG"
,
"1"
)
LoadConfig
()
LoadConfig
()
require
.
True
(
t
,
Debug
)
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