1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

test: add first few unit tests

This commit is contained in:
Ferdinand Mütsch
2020-11-08 12:46:12 +01:00
parent 35cdc7b485
commit ad8168801c
17 changed files with 519 additions and 11 deletions

View File

@@ -52,12 +52,17 @@ To use the hosted version set `api_url = https://wakapi.dev/api/heartbeat`. Howe
**Note:** By default, the application is running in dev mode. However, it is recommended to set `ENV=production` for enhanced performance and security. To still be able to log in when using production mode, you either have to run Wakapi behind a reverse proxy, that enables for HTTPS encryption (see [best practices](#best-practices)) or set `security.insecure_cookies` to `true` in `config.yml`.
### Run with Docker
```
```bash
docker run -d -p 3000:3000 --name wakapi n1try/wakapi
```
By default, SQLite is used as a database. To run Wakapi in Docker with MySQL or Postgres, see [Dockerfile](https://github.com/muety/wakapi/blob/master/Dockerfile) and [config.default.yml](https://github.com/muety/wakapi/blob/master/config.default.yml) for further options.
### Running tests
```bash
CGO_FLAGS="-g -O2 -Wno-return-local-addr" go test ./...
```
## 🔧 Configuration
You can specify configuration options either via a config file (default: `config.yml`, customziable through the `-c` argument) or via environment variables. Here is an overview of all options.