Skip to content

Commit e0141b9

Browse files
committed
add clone script and instructions
1 parent d26a5f8 commit e0141b9

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ Unit tests can be executed on the command line by running
6363
./gradlew :<firebase-project>:check
6464
```
6565

66+
#### Vertex AI for Firebase
67+
68+
See the Vertex AI for Firebase [README](firebase-vertexai#running-tests) for setup
69+
instructions specific to that project.
70+
6671
### Integration Testing
6772

6873
These are tests that run on a hardware device or emulator. These tests have

firebase-vertexai/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ All Gradle commands should be run from the root of this repository.
1515

1616
## Running Tests
1717

18+
> [!IMPORTANT]
19+
> These unit tests require mock response files, which can be downloaded by running
20+
`./firebase-vertexai/update_responses.sh` from the root of this repository.
21+
1822
Unit tests:
1923

2024
`./gradlew :firebase-vertexai:check`
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Mock response files should be cloned into this directory to run unit tests. See
2+
the Vertex AI for Firebase [README](../../..#running-tests) for instructions.

firebase-vertexai/update_responses.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# Copyright 2024 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# This script replaces mock response files for Vertex AI unit tests with a fresh
18+
# clone of the shared repository of Vertex AI test data.
19+
20+
cd "$(dirname "$0")/src/test/resources" || exit
21+
rm -rf vertexai-sdk-test-data
22+
git clone --depth 1 https://github.com/FirebaseExtended/vertexai-sdk-test-data.git

0 commit comments

Comments
 (0)