Skip to content

Commit 2025cc7

Browse files
committed
chore: update tests database path and add cleanup script
1 parent 8d59f17 commit 2025cc7

File tree

5 files changed

+159
-3
lines changed

5 files changed

+159
-3
lines changed

tests/Taskfile.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ tasks:
44
desc: "Start the application server for testing"
55
cmds:
66
- "cd application && pnpm migrate:local && pnpm install && pnpm start"
7+
8+
cleanup:
9+
cmds:
10+
- rm -f application/.db.sqlite
11+
712

813
run_tests:
914
desc: "Run unit tests"

tests/application/.env.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ADMINFORTH_SECRET=123
22
NODE_ENV=development
3-
SQLITE_URL=sqlite://migrations/prisma/sqlite/.db.sqlite
3+
SQLITE_URL=sqlite://.db.sqlite
44
SQLITE_FILE_URL=file:.db.sqlite
55

66
CH_MIGRATIONS_HOME=./migrations/clickhouse_migrations

tests/application/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const admin = new AdminForth({
5555
dataSources: [
5656
{
5757
id: 'sqlite',
58-
url: `${process.env.DATABASE_URL}`
58+
url: `${process.env.SQLITE_URL}`
5959
},
6060
],
6161
resources: [

tests/application/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@types/node": "latest",
2828
"prisma": "^7.5.0",
2929
"tsx": "4.11.2",
30-
"typescript": "5.4.5"
30+
"typescript": "5.4.5",
31+
"wait-on": "^9.0.4"
3132
}
3233
}

tests/application/pnpm-lock.yaml

Lines changed: 150 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)