Skip to content

Commit

Permalink
Migrate gpbackup tests for GPDB 7 in Ubuntu-based container (#119)
Browse files Browse the repository at this point in the history
Fix the docker test to support Ubuntu for GPDB 7 by adding a case testing the
current OS. Also modify the README and add comment in Dockerfile to reflect
migration to Ubuntu.

Ticket: ADBDEV-6410

Co-authored-by: Georgy Shelkovy <[email protected]>
  • Loading branch information
silent-observer and RekGRpth authored Nov 20, 2024
1 parent 0a219ad commit c67af73
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions arenadata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# centos: hub.adsw.io/library/gpdb6_regress:latest
# rocky: hub.adsw.io/library/gpdb7_regress:latest
# ubuntu: hub.adsw.io/library/gpdb6_u22:latest
# ubuntu: hub.adsw.io/library/gpdb7_u22:latest
# default image is centos
ARG GPDB_IMAGE=hub.adsw.io/library/gpdb6_regress:latest
FROM $GPDB_IMAGE
Expand Down
2 changes: 1 addition & 1 deletion arenadata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ docker run --rm -it --sysctl 'kernel.sem=500 1024000 200 4096' gpbackup:test bas

7x:
```bash
docker build -t gpbackup:test7x -f arenadata/Dockerfile --build-arg GPDB_IMAGE=hub.adsw.io/library/gpdb7_regress:latest .
docker build -t gpbackup:test7x -f arenadata/Dockerfile --build-arg GPDB_IMAGE=hub.adsw.io/library/gpdb7_u22:latest .
docker run --rm -it --sysctl 'kernel.sem=500 1024000 200 4096' gpbackup:test7x bash -c "ssh-keygen -A && /usr/sbin/sshd && bash /home/gpadmin/go/src/github.com/greenplum-db/gpbackup/arenadata/run_gpbackup_tests.bash"
```
9 changes: 8 additions & 1 deletion arenadata/run_gpbackup_tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

set -eox pipefail

. /etc/os-release
export TEST_OS="$ID"

# 7x has additional tests with de_DE locale. Install the missing.
# 6x has no such package and following commands are excessive, but it's not an error.
yum install -y glibc-locale-source || true
case "$TEST_OS" in
rocky*)
yum install -y glibc-locale-source
;;
esac
localedef -i de_DE -f UTF-8 de_DE

source gpdb_src/concourse/scripts/common.bash
Expand Down

0 comments on commit c67af73

Please sign in to comment.