mirror of
https://github.com/dnote/dnote
synced 2026-03-14 22:45:50 +01:00
20 lines
493 B
Bash
Executable file
20 lines
493 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# test.sh runs server tests. It is to be invoked by other scripts that set
|
|
# appropriate env vars.
|
|
set -eux
|
|
|
|
dir=$(dirname "${BASH_SOURCE[0]}")
|
|
pushd "$dir/../../pkg/server"
|
|
|
|
export DNOTE_TEST_EMAIL_TEMPLATE_DIR="$dir/../../pkg/server/mailer/templates/src"
|
|
|
|
if [ "${WATCH-false}" == true ]; then
|
|
set +e
|
|
while inotifywait --exclude .swp -e modify -r .; do go test ./... -cover -p 1; done;
|
|
set -e
|
|
else
|
|
# go test ./... -cover -p 1
|
|
go test ./... -cover -p 1
|
|
fi
|
|
|
|
popd
|