check all tests
This commit is contained in:
parent
b511e679ae
commit
a136fda92d
1 changed files with 32 additions and 29 deletions
|
@ -255,35 +255,38 @@ def test_run_configuration_repos_ordered():
|
||||||
assert results == expected_results
|
assert results == expected_results
|
||||||
|
|
||||||
|
|
||||||
# def test_run_configuration_retries_round_robin():
|
def test_run_configuration_retries_round_robin():
|
||||||
# flexmock(module).should_receive('verbosity_to_log_level').and_return(logging.INFO)
|
flexmock(module).should_receive('verbosity_to_log_level').and_return(logging.INFO)
|
||||||
# flexmock(module.borg_version).should_receive('local_borg_version').and_return(flexmock())
|
flexmock(module.borg_version).should_receive('local_borg_version').and_return(flexmock())
|
||||||
# flexmock(module.command).should_receive('execute_hook')
|
flexmock(module.command).should_receive('execute_hook')
|
||||||
# flexmock(module).should_receive('run_actions').and_raise(OSError).times(4)
|
flexmock(module).should_receive('run_actions').and_raise(OSError).times(4)
|
||||||
# flexmock(module).should_receive('log_error_records').with_args(
|
flexmock(module).should_receive('log_error_records').with_args(
|
||||||
# 'foo: Error running actions for repository',
|
'foo: Error running actions for repository',
|
||||||
# OSError,
|
OSError,
|
||||||
# levelno=logging.WARNING,
|
levelno=logging.WARNING,
|
||||||
# log_command_error_output=True,
|
log_command_error_output=True,
|
||||||
# ).and_return([flexmock()]).ordered()
|
).and_return([flexmock()]).ordered()
|
||||||
# flexmock(module).should_receive('log_error_records').with_args(
|
flexmock(module).should_receive('log_error_records').with_args(
|
||||||
# 'bar: Error running actions for repository',
|
'bar: Error running actions for repository',
|
||||||
# OSError,
|
OSError,
|
||||||
# levelno=logging.WARNING,
|
levelno=logging.WARNING,
|
||||||
# log_command_error_output=True,
|
log_command_error_output=True,
|
||||||
# ).and_return([flexmock()]).ordered()
|
).and_return([flexmock()]).ordered()
|
||||||
# foo_error_logs = [flexmock()]
|
foo_error_logs = [flexmock()]
|
||||||
# flexmock(module).should_receive('log_error_records').with_args(
|
flexmock(module).should_receive('log_error_records').with_args(
|
||||||
# 'foo: Error running actions for repository', OSError
|
'foo: Error running actions for repository', OSError
|
||||||
# ).and_return(foo_error_logs).ordered()
|
).and_return(foo_error_logs).ordered()
|
||||||
# bar_error_logs = [flexmock()]
|
bar_error_logs = [flexmock()]
|
||||||
# flexmock(module).should_receive('log_error_records').with_args(
|
flexmock(module).should_receive('log_error_records').with_args(
|
||||||
# 'bar: Error running actions for repository', OSError
|
'bar: Error running actions for repository', OSError
|
||||||
# ).and_return(bar_error_logs).ordered()
|
).and_return(bar_error_logs).ordered()
|
||||||
# config = {'location': {'repositories': [{'path':'foo','path':'bar'}]}, 'storage': {'retries': 1}}
|
config = {
|
||||||
# arguments = {'global': flexmock(monitoring_verbosity=1, dry_run=False), 'create': flexmock()}
|
'location': {'repositories': [{'path': 'foo'}, {'path': 'bar'}]},
|
||||||
# results = list(module.run_configuration('test.yaml', config, arguments))
|
'storage': {'retries': 1},
|
||||||
# assert results == foo_error_logs + bar_error_logs
|
}
|
||||||
|
arguments = {'global': flexmock(monitoring_verbosity=1, dry_run=False), 'create': flexmock()}
|
||||||
|
results = list(module.run_configuration('test.yaml', config, arguments))
|
||||||
|
assert results == foo_error_logs + bar_error_logs
|
||||||
|
|
||||||
|
|
||||||
def test_run_configuration_retries_one_passes():
|
def test_run_configuration_retries_one_passes():
|
||||||
|
|
Loading…
Reference in a new issue