File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change
1
+ # crates_io_test_db
2
+
3
+ This package contains the code necessary to create test databases for testing
4
+ purposes.
5
+
6
+ ` TestDatabase::new() ` can be used to create a new test database, based on a
7
+ template database, which is lazily created the first time it is needed.
8
+
9
+ The databases are created based on the ` TEST_DATABASE_URL ` environment variable,
10
+ which should be set to a valid database URL. The template database will then be
11
+ created with a similar name and ` _template ` suffix, while the test databases
12
+ will use random suffixes.
13
+
14
+ Note that the template database will be created with applied database migrations,
15
+ so if you need an empty database, this is not the right tool for you.
Original file line number Diff line number Diff line change
1
+ #![ doc = include_str ! ( "../README.md" ) ]
2
+
1
3
use crates_io_env_vars:: required_var_parsed;
2
4
use diesel:: prelude:: * ;
3
5
use diesel:: r2d2:: { ConnectionManager , Pool , PooledConnection } ;
You can’t perform that action at this time.
0 commit comments