From 8f7928bda39fa66a3d2a8c9c5d0b7063bffba470 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 11 Dec 2024 11:47:57 +0100 Subject: [PATCH] Add missing function for testing langchainjs. Revision was added with 'v' prefix, but upstream repository do not use it. Signed-off-by: Petr "Stone" Hracek --- test/run-upstream | 6 +++--- test/test-lib-nodejs.sh | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/run-upstream b/test/run-upstream index 854a9da1..16a779ea 100755 --- a/test/run-upstream +++ b/test/run-upstream @@ -26,7 +26,7 @@ test_client_faas test_client_cloudevents test_client_fastify test_client_pino -test_client_langchain +test_client_langchainjs " readonly EXPRESS_REVISION="${EXPRESS_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show express version)}" @@ -45,8 +45,8 @@ readonly CLOUDEVENTS_REVISION="v${CLOUDEVENTS_REVISION:-$(docker run --rm "${IMA readonly CLOUDEVENTS_REPO="https://github.com/cloudevents/sdk-javascript.git" readonly FASTIFY_REVISION="v${FASTIFY_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show fastify version)}" readonly FASTIFY_REPO="https://github.com/fastify/fastify.git" -readonly LANGCHAIN_REVISION=v"${LANGCHAIN_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show langchain version)}" -readonly LANGCHAIN_REPO="https://github.com/langchain-ai/langchainjs" +readonly LANGCHAINJS_REVISION="${LANGCHAINJS_REVISION:-$(docker run --rm "${IMAGE_NAME}" -- npm show langchain version)}" +readonly LANGCHAINJS_REPO="https://github.com/langchain-ai/langchainjs.git" # Since we built the candidate image locally, we don't want S2I attempt to pull # it from a registry diff --git a/test/test-lib-nodejs.sh b/test/test-lib-nodejs.sh index 291dbc7f..7d7da54e 100644 --- a/test/test-lib-nodejs.sh +++ b/test/test-lib-nodejs.sh @@ -448,6 +448,12 @@ function test_client_cloudevents() { echo "Running CloudEvents client test" test_running_client_js cloudevents } + +function test_client_langchainjs() { + echo "Running langchainjs client test" + test_running_client_js langchainjs +} + function test_client_fastify() { if [[ "${VERSION}" == *"minimal"* ]]; then VERSION=$(echo "${VERSION}" | cut -d "-" -f 1)