mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Add "sensitive information" warning output
This commit is contained in:
@@ -200,6 +200,12 @@ class Configuration:
|
|||||||
config['exportfilename'] = (config['user_data_dir']
|
config['exportfilename'] = (config['user_data_dir']
|
||||||
/ 'backtest_results')
|
/ 'backtest_results')
|
||||||
|
|
||||||
|
if self.args.get('show_sensitive'):
|
||||||
|
logger.warning(
|
||||||
|
"Sensitive information will be shown in the upcomming output. "
|
||||||
|
"Please make sure to never share this output without redacting "
|
||||||
|
"the information yourself.")
|
||||||
|
|
||||||
def _process_optimize_options(self, config: Config) -> None:
|
def _process_optimize_options(self, config: Config) -> None:
|
||||||
|
|
||||||
# This will override the strategy configuration
|
# This will override the strategy configuration
|
||||||
|
|||||||
@@ -1581,7 +1581,7 @@ def test_start_strategy_updater(mocker, tmp_path):
|
|||||||
assert sc_mock.call_count == 2
|
assert sc_mock.call_count == 2
|
||||||
|
|
||||||
|
|
||||||
def test_start_show_config(capsys):
|
def test_start_show_config(capsys, caplog):
|
||||||
args = [
|
args = [
|
||||||
"show-config",
|
"show-config",
|
||||||
"--config",
|
"--config",
|
||||||
@@ -1608,3 +1608,4 @@ def test_start_show_config(capsys):
|
|||||||
assert "Your combined configuration is:" in captured.out
|
assert "Your combined configuration is:" in captured.out
|
||||||
assert '"max_open_trades":' in captured.out
|
assert '"max_open_trades":' in captured.out
|
||||||
assert '"secret": "REDACTED"' not in captured.out
|
assert '"secret": "REDACTED"' not in captured.out
|
||||||
|
assert log_has_re(r'Sensitive information will be shown in the upcomming output.*', caplog)
|
||||||
|
|||||||
Reference in New Issue
Block a user