mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
add basic api tests
This commit is contained in:
parent
64b0aff075
commit
e00e6ece5f
30 changed files with 350 additions and 17 deletions
15
Makefile
15
Makefile
|
|
@ -6,6 +6,17 @@ docker:
|
|||
testdb:
|
||||
docker run -d --name api-test -p 5433:5432 -e POSTGRES_PASSWORD=test demostf/db
|
||||
|
||||
node_modules: package.json
|
||||
npm install
|
||||
|
||||
.PHONY: mocha
|
||||
mocha: node_modules
|
||||
DEMO_ROOT=/tmp/demos DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres\
|
||||
node node_modules/.bin/mocha --recursive
|
||||
|
||||
.PHONY: phpunit
|
||||
phpunit:
|
||||
cd test; DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres phpunit
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
cd tests; DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres phpunit
|
||||
tests: phpunit mocha
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue