Skip to content

Commit 4940d80

Browse files
author
David Motsonashvili
committed
format and update response version to 7.0
1 parent 8322622 commit 4940d80

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ internal class VertexAIStreamingSnapshotTests {
144144

145145
@Test
146146
fun `http errors`() =
147-
goldenVertexStreamingFile("streaming-failure-http-error.txt", HttpStatusCode.PreconditionFailed) {
147+
goldenVertexStreamingFile(
148+
"streaming-failure-http-error.txt",
149+
HttpStatusCode.PreconditionFailed
150+
) {
148151
val responses = model.generateContentStream("prompt")
149152

150153
withTimeout(testTimeout) { shouldThrow<ServerException> { responses.collect() } }

firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIUnarySnapshotTests.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,10 @@ internal class VertexAIUnarySnapshotTests {
404404

405405
@Test
406406
fun `service disabled`() =
407-
goldenVertexUnaryFile("unary-failure-firebaseml-api-not-enabled.json", HttpStatusCode.Forbidden) {
407+
goldenVertexUnaryFile(
408+
"unary-failure-firebaseml-api-not-enabled.json",
409+
HttpStatusCode.Forbidden
410+
) {
408411
withTimeout(testTimeout) {
409412
shouldThrow<ServiceDisabledException> { model.generateContent("prompt") }
410413
}

firebase-vertexai/src/test/java/com/google/firebase/vertexai/util/tests.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ internal fun goldenUnaryFile(
189189
}
190190

191191
/**
192-
* A variant of [goldenUnaryFile] for vertexai tests
193-
* Loads the *Golden File* and automatically provides it to the channel.
192+
* A variant of [goldenUnaryFile] for vertexai tests Loads the *Golden File* and automatically
193+
* provides it to the channel.
194194
*
195195
* @param name The name of the *Golden File* to load
196196
* @param httpStatusCode An optional [HttpStatusCode] to return as a response

firebase-vertexai/update_responses.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# This script replaces mock response files for Vertex AI unit tests with a fresh
1818
# clone of the shared repository of Vertex AI test data.
1919

20-
RESPONSES_VERSION='v6.*' # The major version of mock responses to use
20+
RESPONSES_VERSION='v7.*' # The major version of mock responses to use
2121
REPO_NAME="vertexai-sdk-test-data"
2222
REPO_LINK="https://github.com/FirebaseExtended/$REPO_NAME.git"
2323

0 commit comments

Comments
 (0)