Skip to content

Commit 505ebd9

Browse files
Make tests work by setting the correct collation
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent eb871fa commit 505ebd9

2 files changed

Lines changed: 25 additions & 7 deletions

File tree

images/remove_images.sh

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,27 @@ then
44
echo "$0: you need to set docker user via DOCKER_USER=username"
55
exit 1
66
fi
7-
docker image rm -f "${DOCKER_USER}/devstats"
8-
docker image rm -f "${DOCKER_USER}/devstats-minimal"
9-
docker image rm -f "${DOCKER_USER}/devstats-grafana"
10-
docker image rm -f "${DOCKER_USER}/devstats-patroni"
11-
docker image rm -f "${DOCKER_USER}/devstats-test"
12-
docker system prune -f
7+
if [ -z "$SKIP_FULL" ]
8+
then
9+
docker image rm -f "${DOCKER_USER}/devstats"
10+
fi
11+
if [ -z "$SKIP_MIN" ]
12+
then
13+
docker image rm -f "${DOCKER_USER}/devstats-minimal"
14+
fi
15+
if [ -z "$SKIP_GRAFANA" ]
16+
then
17+
docker image rm -f "${DOCKER_USER}/devstats-grafana"
18+
fi
19+
if [ -z "$SKIP_PATRONI" ]
20+
then
21+
docker image rm -f "${DOCKER_USER}/devstats-patroni"
22+
fi
23+
if [ -z "$SKIP_TEST" ]
24+
then
25+
docker image rm -f "${DOCKER_USER}/devstats-test"
26+
fi
27+
if [ -z "$SKIP_PRUNE" ]
28+
then
29+
docker system prune -f
30+
fi

tests/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export LANGUAGE="en_US.UTF-8"
33
export LANG="en_US.UTF-8"
44
export LC_ALL="en_US.UTF-8"
55
service postgresql start || exit 1
6-
sudo -u postgres createdb gha || exit 2
6+
sudo -u postgres psql -c "create database gha with lc_collate = 'en_US.UTF-8' lc_ctype = 'en_US.UTF-8' encoding = 'UTF8' template = 'template0'" || exit 2
77
sudo -u postgres psql gha -c "create user gha_admin with password 'pwd'" || exit 3
88
sudo -u postgres psql gha -c 'grant all privileges on database "gha" to gha_admin' || exit 4
99
sudo -u postgres psql gha -c "alter user gha_admin createdb" || exit 5

0 commit comments

Comments
 (0)