File tree Expand file tree Collapse file tree 3 files changed +2
-14
lines changed
Expand file tree Collapse file tree 3 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -226,16 +226,12 @@ impl Tsl {
226226pub struct Configuration {
227227 /// The state of the configuration.
228228 pub settings : RwLock < TorrustIndex > ,
229- /// The path to the configuration file. This is `None` if the configuration
230- /// was loaded from the environment.
231- pub config_path : Option < String > ,
232229}
233230
234231impl Default for Configuration {
235232 fn default ( ) -> Configuration {
236233 Configuration {
237234 settings : RwLock :: new ( TorrustIndex :: default ( ) ) ,
238- config_path : None ,
239235 }
240236 }
241237}
@@ -268,7 +264,6 @@ impl Configuration {
268264
269265 Ok ( Configuration {
270266 settings : RwLock :: new ( index_config) ,
271- config_path : None ,
272267 } )
273268 }
274269
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ use torrust_index::{app, config};
1010/// It launches the app and provides a way to stop it.
1111pub struct AppStarter {
1212 configuration : config:: TorrustIndex ,
13- config_path : Option < String > ,
1413 /// The application binary state (started or not):
1514 /// - `None`: if the app is not started,
1615 /// - `RunningState`: if the app was started.
@@ -19,10 +18,9 @@ pub struct AppStarter {
1918
2019impl AppStarter {
2120 #[ must_use]
22- pub fn with_custom_configuration ( configuration : config:: TorrustIndex , config_path : Option < String > ) -> Self {
21+ pub fn with_custom_configuration ( configuration : config:: TorrustIndex ) -> Self {
2322 Self {
2423 configuration,
25- config_path,
2624 running_state : None ,
2725 }
2826 }
@@ -35,7 +33,6 @@ impl AppStarter {
3533 pub async fn start ( & mut self , api_version : Version ) {
3634 let configuration = Configuration {
3735 settings : RwLock :: new ( self . configuration . clone ( ) ) ,
38- config_path : self . config_path . clone ( ) ,
3936 } ;
4037
4138 // Open a channel to communicate back with this function
Original file line number Diff line number Diff line change @@ -33,12 +33,8 @@ impl TestEnv {
3333 let temp_dir = TempDir :: new ( ) . expect ( "failed to create a temporary directory" ) ;
3434
3535 let configuration = ephemeral ( & temp_dir) ;
36- // Even if we load the configuration from the environment variable, we
37- // still need to provide a path to save the configuration when the
38- // configuration is updated via the `POST /settings` endpoints.
39- let config_path = format ! ( "{}/config.toml" , temp_dir. path( ) . to_string_lossy( ) ) ;
4036
41- let app_starter = AppStarter :: with_custom_configuration ( configuration, Some ( config_path ) ) ;
37+ let app_starter = AppStarter :: with_custom_configuration ( configuration) ;
4238
4339 Self { app_starter, temp_dir }
4440 }
You can’t perform that action at this time.
0 commit comments