mirror of
https://github.com/ollama/ollama.git
synced 2025-06-06 19:29:22 +02:00
Merge pull request #6546 from ollama/mxyng/fix-test
fix(test): do not clobber models directory
This commit is contained in:
commit
47c2b947a9
@ -139,6 +139,7 @@ The temperature in San Francisco, CA is 70°F and in Toronto, Canada is 20°C.`,
|
|||||||
|
|
||||||
func TestParseFromFileFromLayer(t *testing.T) {
|
func TestParseFromFileFromLayer(t *testing.T) {
|
||||||
tempModels := t.TempDir()
|
tempModels := t.TempDir()
|
||||||
|
t.Setenv("OLLAMA_MODELS", tempModels)
|
||||||
|
|
||||||
file, err := os.CreateTemp(tempModels, "")
|
file, err := os.CreateTemp(tempModels, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -189,6 +190,7 @@ func TestParseFromFileFromLayer(t *testing.T) {
|
|||||||
|
|
||||||
func TestParseLayerFromCopy(t *testing.T) {
|
func TestParseLayerFromCopy(t *testing.T) {
|
||||||
tempModels := t.TempDir()
|
tempModels := t.TempDir()
|
||||||
|
t.Setenv("OLLAMA_MODELS", tempModels)
|
||||||
|
|
||||||
file2, err := os.CreateTemp(tempModels, "")
|
file2, err := os.CreateTemp(tempModels, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user