Skip to content

Commit f38cd97

Browse files
authored
integration test fail fast (#94)
2 parents c6a6821 + 68fba65 commit f38cd97

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ci-lint:
1616
golangci-lint run --timeout 5m ./...
1717
.PHONY: ci-lint
1818

19-
integration: build
19+
integration: check build
2020
@echo "==> running integration tests <=="
2121
cd integration && go mod tidy && go test -v -timeout=5m
2222
.PHONY: integration

integration/integration_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
const (
15-
binaryName = "gh-models-test"
15+
binaryName = "gh-models"
1616
timeoutDuration = 30 * time.Second
1717
)
1818

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

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

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

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

0 commit comments

Comments
 (0)