Release server-v2.1.0 (#633)

* Release server-v2.1.0

* Fix smoke test
This commit is contained in:
Sung 2023-03-04 11:57:40 +11:00 committed by GitHub
commit 4258ea1715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 4 deletions

View file

@ -13,7 +13,14 @@ The following log documents the history of the server project.
None
### 2.0.0 2021-05-09
### 2.1.0 2023-03-04
#### Changed
- `OnPremise` environment variable is deprecated and is replaced with `OnPremises`
- Upgrade Go from 1.17 to 1.20.
### 2.0.0 2022-05-09
#### Removed

View file

@ -1 +1,9 @@
This directory contains a smoke test for running a self-hosted instance using a virtual machine.
## Instruction
The following script will set up a test environment in Vagrant and run the test.
```
./run_test.sh
```

View file

@ -1,7 +1,7 @@
# -*- mode: ruby -*-
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.box = "ubuntu/jammy64"
config.vm.synced_folder './volume', '/vagrant'
config.vm.network "forwarded_port", guest: 2300, host: 2300

View file

@ -9,7 +9,11 @@ sudo apt-get update
sudo apt-get install -y postgresql-14
# set up database
sudo usermod -a -G sudo postgres
cd /var/lib/postgresql
sudo -u postgres createdb dnote
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
# allow connection from host and allow to connect without password
sudo sed -i "/port*/a listen_addresses = '*'" /etc/postgresql/14/main/postgresql.conf
sudo sed -i 's/host.*all.*.all.*md5/# &/' /etc/postgresql/14/main/pg_hba.conf

View file

@ -2,10 +2,11 @@
# testsuite.sh runs the smoke tests for a self-hosted instance.
# It is meant to be run inside a virtual machine which has been
# set up by an entry script.
set -eu
set -eux
echo 'Running a smoke test'
cd /var/lib/postgresql
sudo -u postgres dropdb dnote
sudo -u postgres createdb dnote
@ -18,7 +19,7 @@ GO_ENV=PRODUCTION \
DBPort=5432 \
DBName=dnote \
DBUser=postgres \
DBPassword="" \
DBPassword=postgres \
WebURL=localhost:3000 \
./dnote-server -port 2300 start & sleep 3