Skip to content

Commit 71b2bbb

Browse files
committed
Fix testsuite
1 parent d2058fb commit 71b2bbb

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

bin/container-entrypoint.d/entrypoint.d/00-functions.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
#!/usr/bin/env bash
22

3+
function log {
4+
5+
local level=$1
6+
local message=$2
7+
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
8+
9+
local color_reset="\033[0m"
10+
local color_red="\033[31m"
11+
local color_green="\033[32m"
12+
local color_yellow="\033[33m"
13+
local color_blue="\033[34m"
14+
15+
case $level in
16+
INFO)
17+
color="$color_green"
18+
;;
19+
WARN)
20+
color="$color_yellow"
21+
;;
22+
ERROR)
23+
color="$color_red"
24+
;;
25+
DEBUG)
26+
color="$color_blue"
27+
;;
28+
*)
29+
color="$color_reset"
30+
;;
31+
esac
32+
33+
echo -e "${color}[${timestamp}] [${level}] ${message}${color_reset}"
34+
35+
}
36+
337
function apply-template {
438

539
TPLDIR=$1

test/tests.cli.bats

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ export BATS_CONTAINER_ENGINE="${CONTAINER_ENGINE:-podman}"
1515
export BATS_CONTAINER_COMPOSE_ENGINE="${BATS_CONTAINER_ENGINE} compose"
1616
export BATS_CONTAINER_NETWORK_NAME="${CONTAINER_NETWORK_NAME:-docker_default}"
1717

18+
#
19+
# Containers configuration
20+
#
21+
export BATS_APP_TMP_VOLUME_NAME="app_tmp"
22+
export BATS_APP_ETC_VOLUME_NAME="app_etc"
23+
1824
@test "[$TEST_FILE] Check Docker external Volumes (local)" {
1925

2026
BATS_CONTAINER_VOLUME_NAMES=("$BATS_APP_TMP_VOLUME_NAME")

0 commit comments

Comments
 (0)