Skip to content

Commit 7e18147

Browse files
author
Fabiana Severin
committed
Adding echo for easier debugging and check if docker is avail
1 parent 331b87e commit 7e18147

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scripts/test_local.sh

100644100755
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,25 @@
22
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
# SPDX-License-Identifier: Apache-2.0
44

5-
set -e
5+
set -euo pipefail
6+
trap 'echo "Error on line $LINENO"; exit 1' ERR
67

78
echo "Running local unit tests for AWS Lambda NodeJS RIC"
89

10+
# Check if Docker is available
11+
if ! command -v docker &> /dev/null; then
12+
echo "Error: Docker is not installed or not in PATH"
13+
echo "Please install Docker Desktop: https://www.docker.com/products/docker-desktop/"
14+
exit 1
15+
fi
16+
17+
# Check if Docker daemon is running
18+
if ! docker info &> /dev/null; then
19+
echo "Error: Docker daemon is not running"
20+
echo "Please start Docker Desktop and wait for it to initialize"
21+
exit 1
22+
fi
23+
924
# Function to run unit tests for specific Node version
1025
run_unit_tests() {
1126
local node_version=$1

0 commit comments

Comments
 (0)