Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit edfe642

Browse filesBrowse files
UbuntuNikolayS
Ubuntu
authored andcommitted
added dblab init wait, dblab instance status
1 parent 8a9f88e commit edfe642
Copy full SHA for edfe642

File tree

3 files changed

+19
-2
lines changed
Filter options

3 files changed

+19
-2
lines changed

‎test/1.synthetic.sh

Copy file name to clipboardExpand all lines: test/1.synthetic.sh
+13-1Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ sudo docker rm dblab_pg_initdb
3636
### Step ?. Configure and launch the Database Lab server
3737
mkdir -p ~/.dblab
3838
cp ./configs/config.example.physical_generic.yml ~/.dblab/server_test.yml
39+
sed -ri 's/^(\s*)(host:.*$)/\1host: ""/' ~/.dblab/server_test.yml
3940
sed -ri 's/^(\s*)(port: 2345$)/\1port: 12345/' ~/.dblab/server_test.yml
4041
sed -ri 's/^(\s*)(debug:.*$)/\1debug: true/' ~/.dblab/server_test.yml
4142
sed -ri 's/^(\s*)(pool:.*$)/\1pool: "test_pool"/' ~/.dblab/server_test.yml
@@ -52,4 +53,15 @@ sudo docker run \
5253
--volume ~/.dblab/server_test.yml:/home/dblab/configs/config.yml \
5354
"${IMAGE2TEST}"
5455

55-
### Step ?. Setup Database Lab client CLI
56+
### Waiting fori dblab initialization
57+
while true; do
58+
curl http://localhost:12345 && break
59+
sleep 10
60+
done
61+
62+
### Step ?. Setup Dnd init atabase Lab client CLI
63+
curl https://gitlab.com/postgres-ai/database-lab/-/raw/master/scripts/cli_install.sh | bash
64+
dblab --version
65+
dblab init --url http://localhost:12345 --token secret_token --environment-id test
66+
dblab instance status
67+

‎test/_cleanup.sh

Copy file name to clipboardExpand all lines: test/_cleanup.sh
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
set -euxo pipefail
33

4+
45
ZFS_FILE="$(pwd)/zfs_file"
56

67
# TODO: docker rm for all containers that are related to dblab
@@ -10,6 +11,9 @@ sudo docker ps -a --filter 'label=dblab_control' \
1011
| sudo xargs --no-run-if-empty docker rm -f \
1112
|| true
1213
sudo zpool destroy test_pool || true
14+
sudo rm -rf /var/lib/dblab/data/
1315
sudo umount /var/lib/dblab/data || true
1416
sudo rm -f "${ZFS_FILE}"
1517
rm -f ~/.dblab/server_test.yml
18+
19+
dblab config remove test

‎test/_prerequisites.ubuntu.sh

Copy file name to clipboardExpand all lines: test/_prerequisites.ubuntu.sh
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ curl --version || sudo apt-get update && sudo apt-get install -y \
66
ca-certificates \
77
curl \
88
gnupg-agent \
9-
software-properties-common
9+
software-properties-common \
10+
curl
1011

1112
# ZFS
1213
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.