diff --git a/integrations/opensearch/tests/test_document_store.py b/integrations/opensearch/tests/test_document_store.py index 51fc23a6e..4b7e242f2 100644 --- a/integrations/opensearch/tests/test_document_store.py +++ b/integrations/opensearch/tests/test_document_store.py @@ -202,7 +202,7 @@ def test_write_documents(self, document_store: OpenSearchDocumentStore): def test_write_documents_readonly(self, document_store_readonly: OpenSearchDocumentStore): docs = [Document(id="1")] - with pytest.raises(DocumentStoreError, match="no such index"): + with pytest.raises(DocumentStoreError, match="index_not_found_exception"): document_store_readonly.write_documents(docs) def test_create_index(self, document_store_readonly: OpenSearchDocumentStore):