From 68fba65a633c71e2335315f301e1bfeaaf59b127 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 4 Aug 2025 10:48:07 +0000 Subject: [PATCH] fail if gh-models is not found in integration tests --- Makefile | 2 +- integration/integration_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2b4594b..57aa1fd 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/integration/integration_test.go b/integration/integration_test.go index 0b7bfb2..5f3366a 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -12,7 +12,7 @@ import ( ) const ( - binaryName = "gh-models-test" + binaryName = "gh-models" timeoutDuration = 30 * time.Second ) @@ -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 @@ -87,7 +87,7 @@ 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") } @@ -95,7 +95,7 @@ func TestRun(t *testing.T) { // 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") }