Skip to content

Commit

Permalink
setup docker when test
Browse files Browse the repository at this point in the history
  • Loading branch information
amutu committed Feb 13, 2024
1 parent b4d9161 commit d68d018
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 5 additions & 1 deletion check-alpine.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export PGPASSWORD=somepassword
pid=$$
docker run --rm --name testpgzhparser-$pid -p 5432:5432 -d -e POSTGRES_PASSWORD=somepassword@alpine zhparser/zhparser:alpine-16
sleep 5
export PGPASSWORD=somepassword@alpine
psql -h 127.0.0.1 -X -a -q postgres postgres -f sql/zhparser.sql | diff expected/zhparser-alpine.out -

if [ $? -eq 0 ]
Expand All @@ -7,3 +10,4 @@ then
else
echo "do not pass!"
fi
docker stop testpgzhparser-$pid
6 changes: 5 additions & 1 deletion check-debian.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export PGPASSWORD=somepassword
pid=$$
docker run --rm --name testpgzhparser-$pid -p 5432:5432 -d -e POSTGRES_PASSWORD=somepassword@debian-16 zhparser/zhparser:bookworm-16
sleep 5
export PGPASSWORD=somepassword@debian-16
psql -h 127.0.0.1 -X -a -q postgres postgres -f sql/zhparser.sql | diff expected/zhparser-debian.out -

if [ $? -eq 0 ]
Expand All @@ -7,3 +10,4 @@ then
else
echo "do not pass!"
fi
docker stop testpgzhparser-$pid
8 changes: 0 additions & 8 deletions check.sh

This file was deleted.

0 comments on commit d68d018

Please sign in to comment.