File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
postgresql_embedded/tests Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,9 @@ use test_log::test;
99#[ test]
1010fn test_lifecycle ( ) -> Result < ( ) > {
1111 let mut postgresql = PostgreSQL :: default ( ) ;
12- let settings = postgresql. settings ( ) ;
1312
14- if settings. installation_dir . exists ( ) {
15- assert_eq ! ( Status :: Installed , postgresql. status( ) ) ;
16- } else {
17- assert_eq ! ( Status :: NotInstalled , postgresql. status( ) ) ;
18- }
13+ let initial_statuses = [ Status :: NotInstalled , Status :: Installed , Status :: Stopped ] ;
14+ assert ! ( initial_statuses. contains( & postgresql. status( ) ) ) ;
1915
2016 postgresql. setup ( ) ?;
2117 assert_eq ! ( Status :: Stopped , postgresql. status( ) ) ;
Original file line number Diff line number Diff line change @@ -6,13 +6,9 @@ use test_log::test;
66
77async fn lifecycle ( ) -> Result < ( ) > {
88 let mut postgresql = PostgreSQL :: default ( ) ;
9- let settings = postgresql. settings ( ) ;
109
11- if settings. installation_dir . exists ( ) {
12- assert_eq ! ( Status :: Installed , postgresql. status( ) ) ;
13- } else {
14- assert_eq ! ( Status :: NotInstalled , postgresql. status( ) ) ;
15- }
10+ let initial_statuses = [ Status :: NotInstalled , Status :: Installed , Status :: Stopped ] ;
11+ assert ! ( initial_statuses. contains( & postgresql. status( ) ) ) ;
1612
1713 postgresql. setup ( ) . await ?;
1814 assert_eq ! ( Status :: Stopped , postgresql. status( ) ) ;
You can’t perform that action at this time.
0 commit comments