def get_tablestore() -> TablestoreKVStore:
    """Test end to end construction and search."""
    # noinspection DuplicatedCode
    end_point = os.getenv("tablestore_end_point")
    instance_name = os.getenv("tablestore_instance_name")
    access_key_id = os.getenv("tablestore_access_key_id")
    access_key_secret = os.getenv("tablestore_access_key_secret")
    if (
        end_point is None
        or instance_name is None
        or access_key_id is None
        or access_key_secret is None
    ):
        pytest.skip(
            "end_point is None or instance_name is None or "
            "access_key_id is None or access_key_secret is None"
        )

    # 1. create tablestore vector store
    store = TablestoreKVStore(
        endpoint=os.getenv("tablestore_end_point"),
        instance_name=os.getenv("tablestore_instance_name"),
        access_key_id=os.getenv("tablestore_access_key_id"),
        access_key_secret=os.getenv("tablestore_access_key_secret"),
    )
    store.delete_all()
    return store
Test end to end construction and search.
llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-tablestore/tests/test_storage_kvstore_tablestore.py