-
-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathdb.yml
More file actions
25 lines (25 loc) · 614 Bytes
/
Copy pathdb.yml
File metadata and controls
25 lines (25 loc) · 614 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
desc: Test using SQLite3
runners:
db:
dsn: ${TEST_DB_DSN:-sqlite3://:memory:}
steps:
-
include: initdb.yml
-
db:
query: SELECT * FROM users;
-
test: 'steps[1].rows[0].username == "alice"'
-
db:
query: INSERT INTO users (username, password, email, created) VALUES ('charlie', 'passw0rd', 'charlie@example.com', datetime('2022-02-22'))
-
db:
query: SELECT * FROM users WHERE id = {{ steps[3].last_insert_id }}
-
test: 'steps[4].rows[0].username == "charlie"'
-
db:
query: SELECT COUNT(*) AS c FROM users
-
test: 'steps[6].rows[0].c == 3'