File: unit-tests-server

package info (click to toggle)
debusine 0.14.2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 15,200 kB
  • sloc: python: 195,951; sh: 849; javascript: 335; makefile: 116
file content (19 lines) | stat: -rwxr-xr-x 547 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

set -e

service postgresql start
service redis-server start

runuser -u postgres -- createuser --createdb debusine-server

cp -a pyproject.toml "$AUTOPKGTEST_TMP/"
cd "$AUTOPKGTEST_TMP"

cat << EOF >> /etc/debusine/server/test.py

# Use paths from the package (e.g. logs into /var/log/debusine/server)
from .pkg_paths import *  # noqa
EOF

runuser -u debusine-server -- pytest --rootdir=/usr/lib/python3/dist-packages -c pyproject.toml -v --pyargs debusine.db debusine.django debusine.project debusine.server debusine.test debusine.web