Skip to content

Commit 8c86f65

Browse files
committed
test(memory): add Vertex AI provider to integration tests
Support GOOGLE_CLOUD_PROJECT env var for Gemini testing via Vertex AI, matching the pattern used in agent/integration_test.go.
1 parent be4a5b5 commit 8c86f65

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

memory/integration_test.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,21 @@ func availableProviders(t *testing.T) []providerTestCase {
4242
model: "gemini-2.0-flash",
4343
})
4444
}
45+
if project := os.Getenv("GOOGLE_CLOUD_PROJECT"); project != "" {
46+
region := os.Getenv("GOOGLE_CLOUD_REGION")
47+
if region == "" {
48+
region = "us-east5"
49+
}
50+
account := os.Getenv("GOOGLE_CLOUD_ACCOUNT")
51+
providers = append(providers, providerTestCase{
52+
name: "gemini-vertex",
53+
provider: gemini.New("", gemini.WithVertexAI(project, region), gemini.WithTokenSource(provider.GcloudTokenSource(account))),
54+
model: "gemini-2.0-flash",
55+
})
56+
}
4557

4658
if len(providers) == 0 {
47-
t.Skip("no API keys set — skipping integration tests (set ANTHROPIC_API_KEY, OPENAI_API_KEY, or GEMINI_API_KEY)")
59+
t.Skip("no API keys or Vertex AI config set — skipping integration tests")
4860
}
4961
return providers
5062
}

0 commit comments

Comments
 (0)