Skip to content

Commit 9cac47e

Browse files
committed
Add VAIS create corpus test
1 parent 6c6ac9f commit 9cac47e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

generative_ai/rag/test_rag_examples.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import create_corpus_feature_store_example
2424
import create_corpus_pinecone_example
2525
import create_corpus_vector_search_example
26+
import create_corpus_vertex_ai_search_example
2627
import create_corpus_weaviate_example
2728
import delete_corpus_example
2829
import delete_file_example
@@ -138,6 +139,16 @@ def test_create_corpus_weaviate() -> None:
138139
delete_corpus_example.delete_corpus(corpus.name)
139140

140141

142+
def test_create_corpus_vertex_ai_search() -> None:
143+
VAIS_LOCATION = "us"
144+
ENGINE_ID = "test-engine"
145+
corpus = create_corpus_vertex_ai_search_example.create_corpus_vertex_ai_search(
146+
f"projects/{PROJECT_ID}/locations/{VAIS_LOCATION}/collections/default_collection/engines/{ENGINE_ID}"
147+
)
148+
assert corpus
149+
delete_corpus_example.delete_corpus(corpus.name)
150+
151+
141152
def test_get_corpus(test_corpus: pytest.fixture) -> None:
142153
retrieved_corpus = get_corpus_example.get_corpus(test_corpus.name)
143154
assert retrieved_corpus.name == test_corpus.name

0 commit comments

Comments
 (0)