Skip to content

[Vertex AI] Read golden files from vertexai subdirectory #14582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 17, 2025
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 FirebaseVertexAI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Firebase SDK.
unit_tests_dir + '**/*.swift',
]
unit_tests.resources = [
unit_tests_dir + 'vertexai-sdk-test-data/mock-responses/**/*.{txt,json}',
unit_tests_dir + 'vertexai-sdk-test-data/mock-responses/vertexai',
unit_tests_dir + 'Resources/**/*',
]
end
Expand Down
3 changes: 2 additions & 1 deletion FirebaseVertexAI/Tests/Unit/ChatTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
let bundle = BundleTestUtil.bundle()
let fileURL = try XCTUnwrap(bundle.url(
forResource: "streaming-success-basic-reply-parts",
withExtension: "txt"
withExtension: "txt",
subdirectory: "vertexai"
))

// Skip tests using MockURLProtocol on watchOS; unsupported in watchOS 2 and later, see
Expand All @@ -44,7 +45,7 @@
#if os(watchOS)
throw XCTSkip("Custom URL protocols are unsupported in watchOS 2 and later.")
#endif // os(watchOS)
MockURLProtocol.requestHandler = { request in

Check warning on line 48 in FirebaseVertexAI/Tests/Unit/ChatTests.swift

View workflow job for this annotation

GitHub Actions / spm-unit (macos-15, Xcode_16.2, watchOS)

code after 'throw' will never be executed
let response = HTTPURLResponse(
url: request.url!,
statusCode: 200,
Expand Down
Loading
Loading