File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 2
2
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
# SPDX-License-Identifier: Apache-2.0
4
4
5
- set -e
5
+ set -euo pipefail
6
+ trap ' echo "Error on line $LINENO"; exit 1' ERR
6
7
7
8
echo " Running local unit tests for AWS Lambda NodeJS RIC"
8
9
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
+
9
24
# Function to run unit tests for specific Node version
10
25
run_unit_tests () {
11
26
local node_version=$1
You can’t perform that action at this time.
0 commit comments