

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Postgres
incomplete
2: Goose Migrations
incomplete
3: SQLC
incomplete
4: Reset
incomplete
5: List Users
incomplete
This lesson's interactive features are locked, please to keep using them
When doing end-to-end testing on a system like this, it's always a bit annoying to have to manually reset the state of the database. For example, the register command fails if you run it again with the same username because the user already exists.
That's the behavior we want, but we have to manually reset the database each time we run tests.
Let's add a command to our CLI that will reset the database to a blank state. This will make development much easier for us (although probably not useful in production... maybe even disastrous).
Run and submit the CLI tests.