Skip to content

Commit 9017c35

Browse files
authored
VertexAI: use updated set of mock responses (#6180)
1 parent fb2f8b2 commit 9017c35

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ internal class StreamingSnapshotTests {
7272
}
7373

7474
@Test
75-
fun `unknown enum`() =
76-
goldenStreamingFile("streaming-success-unknown-enum.txt") {
75+
fun `unknown enum in safety ratings`() =
76+
goldenStreamingFile("streaming-success-unknown-safety-enum.txt") {
7777
val responses = model.generateContentStream("prompt")
7878

7979
withTimeout(testTimeout) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ internal class UnarySnapshotTests {
7777
}
7878

7979
@Test
80-
fun `unknown enum`() =
81-
goldenUnaryFile("unary-success-unknown-enum.json") {
80+
fun `unknown enum in safety ratings`() =
81+
goldenUnaryFile("unary-success-unknown-enum-safety-ratings.json") {
8282
withTimeout(testTimeout) {
8383
val response = model.generateContent("prompt")
8484

@@ -322,7 +322,7 @@ internal class UnarySnapshotTests {
322322

323323
@Test
324324
fun `service disabled`() =
325-
goldenUnaryFile("unary-failure-service-disabled.json", HttpStatusCode.Forbidden) {
325+
goldenUnaryFile("unary-failure-firebaseml-api-not-enabled.json", HttpStatusCode.Forbidden) {
326326
withTimeout(testTimeout) {
327327
shouldThrow<ServiceDisabledException> { model.generateContent("prompt") }
328328
}

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='v1.*' # The major version of mock responses to use
20+
RESPONSES_VERSION='v2.*' # 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)