File tree Expand file tree Collapse file tree 3 files changed +36
-12
lines changed Expand file tree Collapse file tree 3 files changed +36
-12
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ version : 2
2+ jobs :
3+ build :
4+ working_directory : ~/build
5+ docker :
6+ - image : jimmycuadra/rust:1.19.0
7+ - image : postgres:9.6
8+ environment :
9+ POSTGRES_PASSWORD : password
10+ steps :
11+ - checkout
12+ - restore_cache :
13+ key : registry
14+ - run : cargo generate-lockfile
15+ - save_cache :
16+ key : registry-{{ epoch }}
17+ paths :
18+ - ~/.cargo/registry/index
19+ - restore_cache :
20+ key : dependencies-1.19-{{ checksum "Cargo.lock" }}
21+ - run : cargo test
22+ - save_cache :
23+ key : dependencies-1.19-{{ checksum "Cargo.lock" }}
24+ paths :
25+ - target
26+ - ~/.cargo/registry/cache
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ use r2d2_postgres::{TlsMode, PostgresConnectionManager};
1010
1111#[ test]
1212fn test_basic ( ) {
13- let manager = PostgresConnectionManager :: new ( "postgres://postgres@localhost" , TlsMode :: None ) . unwrap ( ) ;
13+ let manager =
14+ PostgresConnectionManager :: new ( "postgres://postgres:password@localhost" , TlsMode :: None )
15+ . unwrap ( ) ;
1416 let config = r2d2:: Config :: builder ( ) . pool_size ( 2 ) . build ( ) ;
1517 let pool = Arc :: new ( r2d2:: Pool :: new ( config, manager) . unwrap ( ) ) ;
1618
@@ -41,8 +43,13 @@ fn test_basic() {
4143
4244#[ test]
4345fn test_is_valid ( ) {
44- let manager = PostgresConnectionManager :: new ( "postgres://postgres@localhost" , TlsMode :: None ) . unwrap ( ) ;
45- let config = r2d2:: Config :: builder ( ) . pool_size ( 1 ) . test_on_check_out ( true ) . build ( ) ;
46+ let manager =
47+ PostgresConnectionManager :: new ( "postgres://postgres:password@localhost" , TlsMode :: None )
48+ . unwrap ( ) ;
49+ let config = r2d2:: Config :: builder ( )
50+ . pool_size ( 1 )
51+ . test_on_check_out ( true )
52+ . build ( ) ;
4653 let pool = r2d2:: Pool :: new ( config, manager) . unwrap ( ) ;
4754
4855 pool. get ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments