mirror of
https://github.com/dnote/dnote
synced 2026-03-14 14:35:50 +01:00
parent
d52a5bdf48
commit
4258ea1715
5 changed files with 24 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
2
host/smoketest/Vagrantfile
vendored
2
host/smoketest/Vagrantfile
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue