Skip to content

Commit 0b12159

Browse files
committed
fix: DLE test for release v2.0.0 (#179)
1 parent 4778c63 commit 0b12159

9 files changed

+21
-11
lines changed

test/1.synthetic.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33

44
DIR=${0%/*}
5-
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:master"
5+
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:v2-0"
66
POSTGRES_VERSION="${POSTGRES_VERSION:-10}"
77
### Step 1. Prepare a machine with two disks, Docker and ZFS.
88

@@ -13,9 +13,9 @@ source "${DIR}/_zfs.file.sh"
1313
sudo docker run \
1414
--name dblab_pg_initdb \
1515
--label dblab_control \
16-
--env PGDATA=/var/lib/postgresql/pgdata \
16+
--env PGDATA=/var/lib/dblab/data \
1717
--env POSTGRES_HOST_AUTH_METHOD=trust \
18-
--volume /var/lib/dblab/data:/var/lib/postgresql/pgdata \
18+
--volume /var/lib/dblab:/var/lib/dblab \
1919
--detach \
2020
postgres:${POSTGRES_VERSION}-alpine
2121

@@ -40,6 +40,8 @@ sed -ri 's/^(\s*)(host:.*$)/\1host: ""/' ~/.dblab/server_test.yml
4040
sed -ri 's/^(\s*)(port: 2345$)/\1port: 12345/' ~/.dblab/server_test.yml
4141
sed -ri 's/^(\s*)(debug:.*$)/\1debug: true/' ~/.dblab/server_test.yml
4242
sed -ri 's/^(\s*)(pool:.*$)/\1pool: "test_pool"/' ~/.dblab/server_test.yml
43+
sed -ri 's/^(\s*)(- physicalRestore$)/\1/' ~/.dblab/server_test.yml
44+
4345
# replace postgres version
4446
sed -ri "s/:12/:${POSTGRES_VERSION}/g" ~/.dblab/server_test.yml
4547

@@ -80,6 +82,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
8082
dblab clone reset testclone
8183
dblab clone status testclone
8284
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
85+
dblab clone destroy testclone
8386

8487
### Step 7. Destroy clone
8588
dblab clone create --username testuser --password testuser --id testclone2

test/2.logical_generic.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
7373
dblab clone reset testclone
7474
dblab clone status testclone
7575
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
76+
dblab clone destroy testclone
7677

7778
### Step 7. Destroy clone
7879
dblab clone create --username testuser --password testuser --id testclone2

test/3.physical_walg.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33

44
DIR=${0%/*}
5-
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:master"
5+
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:v2-0"
66
POSTGRES_VERSION="${POSTGRES_VERSION:-10}"
77
### Step 1: Prepare a machine with two disks, Docker and ZFS
88

@@ -63,6 +63,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
6363
dblab clone reset testclone
6464
dblab clone status testclone
6565
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
66+
dblab clone destroy testclone
6667

6768
### Step 7. Destroy clone
6869
dblab clone create --username testuser --password testuser --id testclone2

test/4.physical_basebackup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33

44
DIR=${0%/*}
5-
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:master"
5+
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:v2-0"
66
SOURCE_HOST="${SOURCE_HOST:-172.31.39.142}"
77
SOURCE_USERNAME="${SOURCE_USERNAME:-postgres}"
88
SOURCE_PASSWORD="${SOURCE_PASSWORD:-qwerty}"
@@ -66,6 +66,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
6666
dblab clone reset testclone
6767
dblab clone status testclone
6868
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
69+
dblab clone destroy testclone
6970

7071
### Step 7. Destroy clone
7172
dblab clone create --username testuser --password testuser --id testclone2

test/5.logical_rds_iam.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33

44
DIR=${0%/*}
5-
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:master"
5+
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:v2-0"
66
POSTGRES_VERSION="${POSTGRES_VERSION:-10}"
77
AWS_USER="${AWS_USER:-dmitry}"
88
RDS_DATABASENAME="${RDS_DATABASENAME:-database-df-test-2}"
@@ -66,6 +66,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
6666
dblab clone reset testclone
6767
dblab clone status testclone
6868
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
69+
dblab clone destroy testclone
6970

7071
### Step 7. Destroy clone
7172
dblab clone create --username testuser --password testuser --id testclone2

test/6.logical_rds_password.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33

44
DIR=${0%/*}
5-
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:master"
5+
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:v2-0"
66
SOURCE_DBNAME="${SOURCE_DBNAME:-rds_test}"
77
SOURCE_HOST="${SOURCE_HOST:-database-df-test-2.cpawoeaiqdwq.us-east-2.rds.amazonaws.com}"
88
SOURCE_USERNAME="${SOURCE_USERNAME:-postgres1}"
@@ -73,6 +73,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
7373
dblab clone reset testclone
7474
dblab clone status testclone
7575
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
76+
dblab clone destroy testclone
7677

7778
### Step 7. Destroy clone
7879
dblab clone create --username testuser --password testuser --id testclone2

test/7.logical_aurora_password.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33

44
DIR=${0%/*}
5-
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:master"
5+
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:v2-0"
66
SOURCE_DBNAME="${SOURCE_DBNAME:-rds_test}"
77
SOURCE_HOST="${SOURCE_HOST:-aurora-test2-instance-1.cpawoeaiqdwq.us-east-2.rds.amazonaws.com}"
88
SOURCE_USERNAME="${SOURCE_USERNAME:-postgres}"
@@ -72,6 +72,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
7272
dblab clone reset testclone
7373
dblab clone status testclone
7474
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
75+
dblab clone destroy testclone
7576

7677
### Step 7. Destroy clone
7778
dblab clone create --username testuser --password testuser --id testclone2

test/8.logical_aurora_iam.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euxo pipefail
33

44
DIR=${0%/*}
5-
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:master"
5+
IMAGE2TEST="registry.gitlab.com/postgres-ai/database-lab/dblab-server:v2-0"
66
POSTGRES_VERSION="${POSTGRES_VERSION:-10}"
77
AWS_USER="${AWS_USER:-dmitry}"
88
RDS_DATABASENAME="${RDS_DATABASENAME:-aurora-test2-instance-1}"
@@ -65,6 +65,7 @@ psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
6565
dblab clone reset testclone
6666
dblab clone status testclone
6767
psql "host=localhost port=6000 user=testuser dbname=test" -c '\l'
68+
dblab clone destroy testclone
6869

6970
### Step 9. Destroy clone
7071
dblab clone create --username testuser --password testuser --id testclone2

test/_zfs.file.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ sudo zpool create -f \
1010
-O atime=off \
1111
-O recordsize=8k \
1212
-O logbias=throughput \
13-
-m /var/lib/dblab/data \
13+
-m /var/lib/dblab \
1414
test_pool \
1515
"${ZFS_FILE}"
1616

17-
sudo chmod 0750 /var/lib/dblab/data
17+
sudo chmod 0755 /var/lib/dblab/data
1818

1919
zfs list

0 commit comments

Comments
 (0)