Conversation
| let _create_data_dir = create_dir_all(&data_dir); | ||
| let config_file_relative = File::create(data_dir.join("config.toml")).unwrap(); | ||
| fill_up_config_file(config_file_relative); | ||
| let env_vec_array = vec![ |
There was a problem hiding this comment.
I cannot write it lower than here but I continue to think that the DirsWrapperMock doesn't belong in here, it should only be the real one. The code should figure out home_dir and data_dir on its own, genuinely. It would be possible that the test wouldn't pass for that reason of what the tests claims but just because you determined it by these supplied values in the Mock. If I'm wrong and the test fails then... I'd be disappointed... but I think we'll have to think that out even further.
| "node_configurator_standard", | ||
| "tilde_in_config_file_path_from_commandline_and_args_uploaded_from_config_file", | ||
| ); | ||
| let home_dir = base_dir.clone(); |
There was a problem hiding this comment.
I might have overlooked, it is possible, but it seems to me that you actually don't need to create this "base_dir" first and then the "home_dir". I might be able to write directly:
let home_dir = ensure_node_home_directory_exists(
"node_configurator_standard",
"tilde_in_config_file_path_from_commandline_and_args_uploaded_from_config_file",
);
| .join("config.toml"); | ||
| let mut config_file = File::create(&config_file_path).unwrap(); | ||
| config_file | ||
| .write_all(b"blockchain-service-url = \"https://www.mainnet.com\"\n") |
There was a problem hiding this comment.
I mentioned it at the other test already, please try eliminating the DirsWrapperMock.
…mandline_and_args_uploaded_from_config_file
…rapperReal and simplifying home_dir creation
…path_from_commandline_and_args_uploaded_from_config_file
…mmandline_and_args_uploaded_from_config_file
…ir for DirsWrapperMock
No description provided.