File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,7 @@ fn init_settings() -> RwLock<Config> {
5353}
5454
5555/// test may run in subdirectory
56- #[ cfg( test) ]
57- fn retrieve_settings_dir ( ) -> Result < PathBuf > {
56+ pub fn retrieve_settings_dir ( ) -> Result < PathBuf > {
5857 use crate :: error:: Error ;
5958
6059 const MAX_PARENT_DIRS : usize = 1 ;
@@ -75,11 +74,6 @@ fn retrieve_settings_dir() -> Result<PathBuf> {
7574 Err ( Error :: MissingSettingsDirectory )
7675}
7776
78- #[ cfg( not( test) ) ]
79- fn retrieve_settings_dir ( ) -> Result < PathBuf > {
80- std:: env:: current_dir ( ) . context ( error:: MissingWorkingDirectory )
81- }
82-
8377#[ cfg( test) ]
8478pub fn set_config < T > ( key : & str , value : T ) -> Result < ( ) >
8579where
Original file line number Diff line number Diff line change @@ -18,9 +18,14 @@ impl Drop for DroppingServer {
1818
1919impl DroppingServer {
2020 fn new ( schema_name : & str ) -> Self {
21+ let dir = geoengine_services:: util:: config:: retrieve_settings_dir ( ) . unwrap ( ) ;
22+
2123 let process = Command :: cargo_bin ( "main" )
2224 . unwrap ( )
23- . env ( "GEOENGINE_SETTINGS_FILE_PATH" , "Settings-test.toml" )
25+ . env (
26+ "GEOENGINE_SETTINGS_FILE_PATH" ,
27+ dir. join ( "Settings-test.toml" ) ,
28+ )
2429 . env ( "GEOENGINE_POSTGRES__SCHEMA" , schema_name)
2530 . stderr ( Stdio :: piped ( ) )
2631 . spawn ( )
You can’t perform that action at this time.
0 commit comments