mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 14:13:18 +08:00
[PM-21075] Initial database seeder (#5703)
Adds a database seeder which can be used standalone using a CLI for seeding your local development environment, or used in unit tests to seed complex scenarios. --------- Co-authored-by: Robert Y <rkac@bitwarden.com>
This commit is contained in:
18
util/Seeder/README.md
Normal file
18
util/Seeder/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Bitwarden Database Seeder
|
||||
|
||||
A class library for generating and inserting test data.
|
||||
|
||||
## Project Structure
|
||||
|
||||
The project is organized into these main components:
|
||||
|
||||
### Factories
|
||||
|
||||
Factories are helper classes for creating domain entities and populating them with realistic data. This assist in
|
||||
decreasing the amount of boilerplate code needed to create test data in recipes.
|
||||
|
||||
### Recipes
|
||||
|
||||
Recipes are pre-defined data sets which can be run to generate and load data into the database. They often allow a allow
|
||||
for a few arguments to customize the data slightly. Recipes should be kept simple and focused on a single task. Default
|
||||
to creating more recipes rather than adding complexity to existing ones.
|
||||
Reference in New Issue
Block a user