Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

test(ts/e2e-tests): get rid of outdated --node-versions flag

jkomyno75ef1b4715c3
diff --git a/ts/e2e-tests/_utils/run-docker-test.sh b/ts/e2e-tests/_utils/run-docker-test.sh
index f7a201f9f..1d94b7b40 100755
--- a/ts/e2e-tests/_utils/run-docker-test.sh
+++ b/ts/e2e-tests/_utils/run-docker-test.sh
@@ -2,17 +2,15 @@
# Reusable Docker test runner for e2e tests
#
# Usage:
-# run-docker-test.sh --name <name> --dir <dir> --cmd <cmd> [--node-versions <versions>]
+# run-docker-test.sh --name <name> --dir <dir> --cmd <cmd>
#
# Arguments:
# --name, -n Name for the Docker image (e.g., "composio-cjs-test")
# --dir, -d Relative path from repo root to test directory (e.g., "ts/packages/core/test-e2e/node-cjs")
# --cmd, -c Command to run (e.g., "node test.cjs", "node test.mjs", "pnpm test"). Default: "pnpm test"
-# --node-versions Space-separated Node.js versions to test with. Default: "20.19.0"
-# --node Single Node.js version (alias for --node-versions with one version)
#
# Example:
-# ./run-docker-test.sh --name "composio-cjs-test" --dir "ts/packages/core/test-e2e/node-cjs" --cmd "node test.cjs" --node-versions "20.18.0 20.19.0"
+# ./run-docker-test.sh --name "composio-cjs-test" --dir "ts/packages/core/test-e2e/node-cjs" --cmd "node test.cjs"
set -e
@@ -23,7 +21,7 @@ PASSTHROUGH_ENV_VARS=(
)
# Default values
-NODE_VERSIONS="20.19.0"
+NODE_VERSION="20.19.0"
TEST_NAME=""
TEST_DIR=""
TEST_CMD="pnpm test"
@@ -43,17 +41,9 @@ while [[ $# -gt 0 ]]; do
TEST_CMD="$2"
shift 2
;;
- --node-versions)
- NODE_VERSIONS="$2"
- shift 2
- ;;
- --node)
- NODE_VERSIONS="$2"
- shift 2
- ;;
*)
echo "Error: Unknown argument '$1'"
- echo "Usage: run-docker-test.sh --name <name> --dir <dir> --cmd <cmd> [--node-versions <versions>]"
+ echo "Usage: run-docker-test.sh --name <name> --dir <dir> --cmd <cmd>"
exit 1
;;
esac
@@ -80,7 +70,7 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
DEBUG_LOG="$REPO_ROOT/$TEST_DIR/DEBUG.log"
echo "πŸ§ͺ Running Docker e2e test: $TEST_NAME"
-echo " Node.js versions: $NODE_VERSIONS"
+echo " Node.js version: $NODE_VERSION"
echo " Test directory: $TEST_DIR"
echo " Test command: $TEST_CMD"
echo " Debug log: $DEBUG_LOG"
@@ -88,54 +78,45 @@ echo ""
cd "$REPO_ROOT"
-# Build docker run arguments, passing through relevant environment variables
-DOCKER_ENV_ARGS=""
-if [[ -n "$COMPOSIO_API_KEY" ]]; then
- DOCKER_ENV_ARGS="-e COMPOSIO_API_KEY=$COMPOSIO_API_KEY"
-fi
-
-# Run tests for each Node.js version
-for NODE_VERSION in $NODE_VERSIONS; do
- echo ""
- echo "========================================"
- echo "🐳 Building and testing with Node.js $NODE_VERSION"
- echo "========================================"
+echo ""
+echo "========================================"
+echo "🐳 Building and testing with Node.js $NODE_VERSION"
+echo "========================================"
- IMAGE_NAME="${TEST_NAME}-node${NODE_VERSION}"
+IMAGE_NAME="${TEST_NAME}-node${NODE_VERSION}"
- docker build \
- -f "$SCRIPT_DIR/Dockerfile.node" \
- --build-arg NODE_VERSION="$NODE_VERSION" \
- --build-arg TEST_DIR="$TEST_DIR" \
- --build-arg TEST_CMD="$TEST_CMD" \
- -t "$IMAGE_NAME" \
- . # 2>&1 | tee -a "$DEBUG_LOG"
+docker build \
+ -f "$SCRIPT_DIR/Dockerfile.node" \
+ --build-arg NODE_VERSION="$NODE_VERSION" \
+ --build-arg TEST_DIR="$TEST_DIR" \
+ --build-arg TEST_CMD="$TEST_CMD" \
+ -t "$IMAGE_NAME" \
+ . # 2>&1 | tee -a "$DEBUG_LOG"
- echo ""
- echo "πŸ§ͺ Running test in Docker container..."
- echo "" >> "$DEBUG_LOG"
- echo "=== Docker Run ===" >> "$DEBUG_LOG"
-
- # Build docker run args for env vars
- DOCKER_ENV_ARGS=()
- for var in "${PASSTHROUGH_ENV_VARS[@]}"; do
- if [[ -n "${!var}" ]]; then
- DOCKER_ENV_ARGS+=("-e" "$var=${!var}")
- fi
- done
-
- docker run --rm "${DOCKER_ENV_ARGS[@]}" "$IMAGE_NAME" 2>&1 | tee -a "$DEBUG_LOG"
- EXIT_CODE=${PIPESTATUS[0]}
-
- echo "" >> "$DEBUG_LOG"
- echo "=== Exit Code: $EXIT_CODE ===" >> "$DEBUG_LOG"
-
- if [[ $EXIT_CODE -ne 0 ]]; then
- echo ""
- echo "❌ Docker test failed! See $DEBUG_LOG for details."
- exit $EXIT_CODE
+echo ""
+echo "πŸ§ͺ Running test in Docker container..."
+echo "" >> "$DEBUG_LOG"
+echo "=== Docker Run ===" >> "$DEBUG_LOG"
+
+# Build docker run args for env vars
+DOCKER_ENV_ARGS=()
+for var in "${PASSTHROUGH_ENV_VARS[@]}"; do
+ if [[ -n "${!var}" ]]; then
+ DOCKER_ENV_ARGS+=("-e" "$var=${!var}")
fi
done
+docker run --rm "${DOCKER_ENV_ARGS[@]}" "$IMAGE_NAME" 2>&1 | tee -a "$DEBUG_LOG"
+EXIT_CODE=${PIPESTATUS[0]}
+
+echo "" >> "$DEBUG_LOG"
+echo "=== Exit Code: $EXIT_CODE ===" >> "$DEBUG_LOG"
+
+if [[ $EXIT_CODE -ne 0 ]]; then
+ echo ""
+ echo "❌ Docker test failed! See $DEBUG_LOG for details."
+ exit $EXIT_CODE
+fi
+
echo ""
-echo "βœ… All Node.js versions passed!"
+echo "βœ… Docker test passed!"
diff --git a/ts/e2e-tests/runtimes/node/cjs-basic/run-docker-test.sh b/ts/e2e-tests/runtimes/node/cjs-basic/run-docker-test.sh
index 060dbd547..67fcba2bf 100755
--- a/ts/e2e-tests/runtimes/node/cjs-basic/run-docker-test.sh
+++ b/ts/e2e-tests/runtimes/node/cjs-basic/run-docker-test.sh
@@ -7,10 +7,7 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
UTILS_DIR="$SCRIPT_DIR/../../../_utils"
-NODE_VERSION="${COMPOSIO_E2E_NODE_VERSION:-20.19.0}"
-
"$UTILS_DIR/run-docker-test.sh" \
- --name "composio-cjs-test-${NODE_VERSION}" \
+ --name "composio-cjs-test" \
--dir "ts/e2e-tests/runtimes/node/cjs-basic" \
- --cmd "node test.cjs" \
- --node "$NODE_VERSION"
+ --cmd "node test.cjs"
diff --git a/ts/e2e-tests/runtimes/node/esm-basic/run-docker-test.sh b/ts/e2e-tests/runtimes/node/esm-basic/run-docker-test.sh
index ad93079ae..97cffe810 100755
--- a/ts/e2e-tests/runtimes/node/esm-basic/run-docker-test.sh
+++ b/ts/e2e-tests/runtimes/node/esm-basic/run-docker-test.sh
@@ -7,10 +7,7 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
UTILS_DIR="$SCRIPT_DIR/../../../_utils"
-NODE_VERSION="${COMPOSIO_E2E_NODE_VERSION:-20.19.0}"
-
"$UTILS_DIR/run-docker-test.sh" \
- --name "composio-esm-test-${NODE_VERSION}" \
+ --name "composio-esm-test" \
--dir "ts/e2e-tests/runtimes/node/esm-basic" \
- --cmd "node test.mjs" \
- --node "$NODE_VERSION"
+ --cmd "node test.mjs"
diff --git a/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/run-docker-test.sh b/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/run-docker-test.sh
index ec20f98ac..d0143fad4 100755
--- a/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/run-docker-test.sh
+++ b/ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext/run-docker-test.sh
@@ -3,7 +3,6 @@
# Uses shared Docker test infrastructure from _utils/
#
# Requires COMPOSIO_API_KEY environment variable to be set
-# Tests with Node.js 20.18.0 and 20.19.0 using nvm
set -e
@@ -16,11 +15,7 @@ fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
UTILS_DIR="$SCRIPT_DIR/../../../_utils"
-# Test with both Node.js 20.18.0 and 20.19.0
-NODE_VERSIONS="${COMPOSIO_E2E_NODE_VERSIONS:-20.18.0 20.19.0}"
-
"$UTILS_DIR/run-docker-test.sh" \
--name "composio-typescript-mjs-import-nodenext" \
--dir "ts/e2e-tests/runtimes/node/typescript-mjs-import-nodenext" \
- --cmd "node test.mjs" \
- --node-versions "$NODE_VERSIONS"
+ --cmd "node test.mjs"