Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

Fix envconfig unit test

Daniel Hiltgen824ee5446f49
diff --git a/server/envconfig/config_test.go b/server/envconfig/config_test.go
index b27602992..bad7c4a73 100644
--- a/server/envconfig/config_test.go
+++ b/server/envconfig/config_test.go
@@ -1,20 +1,20 @@
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)
}