Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ci-lint:
golangci-lint run --timeout 5m ./...
.PHONY: ci-lint

integration: build
integration: check build
@echo "==> running integration tests <=="
cd integration && go mod tidy && go test -v -timeout=5m
.PHONY: integration
Expand Down
8 changes: 4 additions & 4 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

const (
binaryName = "gh-models-test"
binaryName = "gh-models"
timeoutDuration = 30 * time.Second
)

Expand All @@ -26,7 +26,7 @@ func getBinaryPath(t *testing.T) string {

// Check if binary exists
if _, err := os.Stat(binaryPath); os.IsNotExist(err) {
t.Skipf("Binary %s not found. Run 'script/build' first.", binaryPath)
t.Fatalf("Binary %s not found. Run 'script/build' first.", binaryPath)
}

return binaryPath
Expand Down Expand Up @@ -87,15 +87,15 @@ func TestList(t *testing.T) {
// TestRun tests the run command with a simple prompt
// This test is more limited since it requires actual model inference
func TestRun(t *testing.T) {
stdout, _, err := runCommand(t, "run", "openai/gpt-4.1-nano", "say 'pain' in french")
stdout, _, err := runCommand(t, "run", "openai/gpt-4.1-nano", "say 'bread' in french")
require.NoError(t, err, "Run should work")
require.Contains(t, strings.ToLower(stdout), "pain")
}

// TestIntegrationRunWithOrg tests the run command with --org flag
func TestRunWithOrg(t *testing.T) {
// Test run command with --org flag (using help to avoid expensive API calls)
stdout, _, err := runCommand(t, "run", "openai/gpt-4.1-nano", "say 'pain' in french", "--org", "github")
stdout, _, err := runCommand(t, "run", "openai/gpt-4.1-nano", "say 'bread' in french", "--org", "github")
require.NoError(t, err, "Run should work")
require.Contains(t, strings.ToLower(stdout), "pain")
}
Loading