You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 25, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: tests/test-smoke
+80-9Lines changed: 80 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,23 @@
1
1
#!/bin/bash
2
2
# Basic integration tests with postgres. Requires docker to work.
3
3
4
+
SOURCE="${BASH_SOURCE[0]}"
5
+
while [ -h"$SOURCE" ];do# resolve $SOURCE until the file is no longer a symlink
6
+
DIR="$(cd -P "$( dirname "$SOURCE")"&&pwd)"
7
+
SOURCE="$(readlink "$SOURCE")"
8
+
[[ $SOURCE!= /* ]] && SOURCE="$DIR/$SOURCE"# if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
9
+
done
10
+
DIR="$(cd -P "$( dirname "$SOURCE")"&&pwd)"
11
+
12
+
cd$DIR
13
+
4
14
VERSIONS=( \
5
15
9.1 \
6
16
9.2 \
7
17
9.3 \
8
18
9.4 \
9
19
9.5 \
20
+
9.6 \
10
21
)
11
22
12
23
smoketest_postgres() {
@@ -17,31 +28,29 @@ smoketest_postgres() {
17
28
18
29
local CUR_IMAGE=$IMAGE_NAME:$version
19
30
31
+
echo"Test standalone cluster..."
20
32
docker run -d --name=$CONTAINER_NAME -e POSTGRES_PASSWORD=password -p 127.0.0.1:55432:5432 $CUR_IMAGE
21
33
34
+
trap"docker logs $CONTAINER_NAME ; docker kill $CONTAINER_NAME ; docker rm $CONTAINER_NAME" EXIT INT TERM
0 commit comments