Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sammcj committed Feb 6, 2025
1 parent c2b4594 commit a27491e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions operations_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package main

import (
"os"
"testing"

"github.com/sammcj/gollama/config"
)

func TestRunModel(t *testing.T) {
// Determine if we're running in CI
inCI := os.Getenv("CI") != "" || os.Getenv("GITHUB_ACTIONS") != ""

tests := []struct {
name string
model string
Expand All @@ -19,21 +23,21 @@ func TestRunModel(t *testing.T) {
model: "test-model",
cfg: &config.Config{DockerContainer: "test-container"},
expectDocker: true,
expectError: false,
expectError: inCI, // Expect error in CI since docker won't be available
},
{
name: "Run without Docker",
model: "test-model",
cfg: &config.Config{DockerContainer: ""},
expectDocker: false,
expectError: false,
expectError: inCI, // Expect error in CI since ollama won't be available
},
{
name: "Run with Docker set to false",
model: "test-model",
cfg: &config.Config{DockerContainer: "false"},
expectDocker: false,
expectError: false,
expectError: inCI, // Expect error in CI since ollama won't be available
},
}

Expand Down

0 comments on commit a27491e

Please sign in to comment.