test_arguments.py 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. import pytest
  2. from flexmock import flexmock
  3. from borgmatic.commands import arguments as module
  4. def test_parse_arguments_with_no_arguments_uses_defaults():
  5. config_paths = ['default']
  6. flexmock(module.collect).should_receive('get_default_config_paths').and_return(config_paths)
  7. arguments = module.parse_arguments()
  8. global_arguments = arguments['global']
  9. assert global_arguments.config_paths == config_paths
  10. assert global_arguments.verbosity == 0
  11. assert global_arguments.syslog_verbosity == 0
  12. assert global_arguments.log_file_verbosity == 0
  13. def test_parse_arguments_with_multiple_config_flags_parses_as_list():
  14. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  15. arguments = module.parse_arguments('--config', 'myconfig', '--config', 'otherconfig')
  16. global_arguments = arguments['global']
  17. assert global_arguments.config_paths == ['myconfig', 'otherconfig']
  18. assert global_arguments.verbosity == 0
  19. assert global_arguments.syslog_verbosity == 0
  20. assert global_arguments.log_file_verbosity == 0
  21. def test_parse_arguments_with_action_after_config_path_omits_action():
  22. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  23. arguments = module.parse_arguments('--config', 'myconfig', 'list', '--json')
  24. global_arguments = arguments['global']
  25. assert global_arguments.config_paths == ['myconfig']
  26. assert 'list' in arguments
  27. assert arguments['list'].json
  28. def test_parse_arguments_with_action_after_config_path_omits_aliased_action():
  29. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  30. arguments = module.parse_arguments('--config', 'myconfig', 'init', '--encryption', 'repokey')
  31. global_arguments = arguments['global']
  32. assert global_arguments.config_paths == ['myconfig']
  33. assert 'rcreate' in arguments
  34. assert arguments['rcreate'].encryption_mode == 'repokey'
  35. def test_parse_arguments_with_action_and_positional_arguments_after_config_path_omits_action_and_arguments():
  36. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  37. arguments = module.parse_arguments('--config', 'myconfig', 'borg', 'key', 'export')
  38. global_arguments = arguments['global']
  39. assert global_arguments.config_paths == ['myconfig']
  40. assert 'borg' in arguments
  41. assert arguments['borg'].options == ['key', 'export']
  42. def test_parse_arguments_with_verbosity_overrides_default():
  43. config_paths = ['default']
  44. flexmock(module.collect).should_receive('get_default_config_paths').and_return(config_paths)
  45. arguments = module.parse_arguments('--verbosity', '1')
  46. global_arguments = arguments['global']
  47. assert global_arguments.config_paths == config_paths
  48. assert global_arguments.verbosity == 1
  49. assert global_arguments.syslog_verbosity == 0
  50. assert global_arguments.log_file_verbosity == 0
  51. def test_parse_arguments_with_syslog_verbosity_overrides_default():
  52. config_paths = ['default']
  53. flexmock(module.collect).should_receive('get_default_config_paths').and_return(config_paths)
  54. arguments = module.parse_arguments('--syslog-verbosity', '2')
  55. global_arguments = arguments['global']
  56. assert global_arguments.config_paths == config_paths
  57. assert global_arguments.verbosity == 0
  58. assert global_arguments.syslog_verbosity == 2
  59. def test_parse_arguments_with_log_file_verbosity_overrides_default():
  60. config_paths = ['default']
  61. flexmock(module.collect).should_receive('get_default_config_paths').and_return(config_paths)
  62. arguments = module.parse_arguments('--log-file-verbosity', '-1')
  63. global_arguments = arguments['global']
  64. assert global_arguments.config_paths == config_paths
  65. assert global_arguments.verbosity == 0
  66. assert global_arguments.syslog_verbosity == 0
  67. assert global_arguments.log_file_verbosity == -1
  68. def test_parse_arguments_with_single_override_parses():
  69. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  70. arguments = module.parse_arguments('--override', 'foo.bar=baz')
  71. global_arguments = arguments['global']
  72. assert global_arguments.overrides == ['foo.bar=baz']
  73. def test_parse_arguments_with_multiple_overrides_flags_parses():
  74. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  75. arguments = module.parse_arguments(
  76. '--override', 'foo.bar=baz', '--override', 'foo.quux=7', '--override', 'this.that=8'
  77. )
  78. global_arguments = arguments['global']
  79. assert global_arguments.overrides == ['foo.bar=baz', 'foo.quux=7', 'this.that=8']
  80. def test_parse_arguments_with_list_json_overrides_default():
  81. arguments = module.parse_arguments('list', '--json')
  82. assert 'list' in arguments
  83. assert arguments['list'].json is True
  84. def test_parse_arguments_with_no_actions_defaults_to_all_actions_enabled():
  85. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  86. arguments = module.parse_arguments()
  87. assert 'prune' in arguments
  88. assert 'create' in arguments
  89. assert 'check' in arguments
  90. def test_parse_arguments_with_no_actions_passes_argument_to_relevant_actions():
  91. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  92. arguments = module.parse_arguments('--stats', '--list')
  93. assert 'prune' in arguments
  94. assert arguments['prune'].stats
  95. assert arguments['prune'].list_archives
  96. assert 'create' in arguments
  97. assert arguments['create'].stats
  98. assert arguments['create'].list_files
  99. assert 'check' in arguments
  100. def test_parse_arguments_with_help_and_no_actions_shows_global_help(capsys):
  101. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  102. with pytest.raises(SystemExit) as exit:
  103. module.parse_arguments('--help')
  104. assert exit.value.code == 0
  105. captured = capsys.readouterr()
  106. assert 'global arguments:' in captured.out
  107. assert 'actions:' in captured.out
  108. def test_parse_arguments_with_help_and_action_shows_action_help(capsys):
  109. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  110. with pytest.raises(SystemExit) as exit:
  111. module.parse_arguments('create', '--help')
  112. assert exit.value.code == 0
  113. captured = capsys.readouterr()
  114. assert 'global arguments:' not in captured.out
  115. assert 'actions:' not in captured.out
  116. assert 'create arguments:' in captured.out
  117. def test_parse_arguments_with_action_before_global_options_parses_options():
  118. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  119. arguments = module.parse_arguments('prune', '--verbosity', '2')
  120. assert 'prune' in arguments
  121. assert arguments['global'].verbosity == 2
  122. def test_parse_arguments_with_global_options_before_action_parses_options():
  123. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  124. arguments = module.parse_arguments('--verbosity', '2', 'prune')
  125. assert 'prune' in arguments
  126. assert arguments['global'].verbosity == 2
  127. def test_parse_arguments_with_prune_action_leaves_other_actions_disabled():
  128. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  129. arguments = module.parse_arguments('prune')
  130. assert 'prune' in arguments
  131. assert 'create' not in arguments
  132. assert 'check' not in arguments
  133. def test_parse_arguments_with_multiple_actions_leaves_other_action_disabled():
  134. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  135. arguments = module.parse_arguments('create', 'check')
  136. assert 'prune' not in arguments
  137. assert 'create' in arguments
  138. assert 'check' in arguments
  139. def test_parse_arguments_disallows_invalid_argument():
  140. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  141. with pytest.raises(ValueError):
  142. module.parse_arguments('--posix-me-harder')
  143. def test_parse_arguments_disallows_encryption_mode_without_init():
  144. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  145. with pytest.raises(ValueError):
  146. module.parse_arguments('--config', 'myconfig', '--encryption', 'repokey')
  147. def test_parse_arguments_allows_encryption_mode_with_init():
  148. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  149. module.parse_arguments('--config', 'myconfig', 'init', '--encryption', 'repokey')
  150. def test_parse_arguments_requires_encryption_mode_with_init():
  151. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  152. with pytest.raises(SystemExit):
  153. module.parse_arguments('--config', 'myconfig', 'init')
  154. def test_parse_arguments_disallows_append_only_without_init():
  155. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  156. with pytest.raises(ValueError):
  157. module.parse_arguments('--config', 'myconfig', '--append-only')
  158. def test_parse_arguments_disallows_storage_quota_without_init():
  159. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  160. with pytest.raises(ValueError):
  161. module.parse_arguments('--config', 'myconfig', '--storage-quota', '5G')
  162. def test_parse_arguments_allows_init_and_prune():
  163. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  164. module.parse_arguments('--config', 'myconfig', 'init', '--encryption', 'repokey', 'prune')
  165. def test_parse_arguments_allows_init_and_create():
  166. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  167. module.parse_arguments('--config', 'myconfig', 'init', '--encryption', 'repokey', 'create')
  168. def test_parse_arguments_allows_repository_with_extract():
  169. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  170. module.parse_arguments(
  171. '--config', 'myconfig', 'extract', '--repository', 'test.borg', '--archive', 'test'
  172. )
  173. def test_parse_arguments_allows_repository_with_mount():
  174. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  175. module.parse_arguments(
  176. '--config',
  177. 'myconfig',
  178. 'mount',
  179. '--repository',
  180. 'test.borg',
  181. '--archive',
  182. 'test',
  183. '--mount-point',
  184. '/mnt',
  185. )
  186. def test_parse_arguments_allows_repository_with_list():
  187. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  188. module.parse_arguments('--config', 'myconfig', 'list', '--repository', 'test.borg')
  189. def test_parse_arguments_disallows_archive_unless_action_consumes_it():
  190. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  191. with pytest.raises(ValueError):
  192. module.parse_arguments('--config', 'myconfig', '--archive', 'test')
  193. def test_parse_arguments_disallows_paths_unless_action_consumes_it():
  194. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  195. with pytest.raises(ValueError):
  196. module.parse_arguments('--config', 'myconfig', '--path', 'test')
  197. def test_parse_arguments_disallows_other_actions_with_config_bootstrap():
  198. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  199. with pytest.raises(ValueError):
  200. module.parse_arguments('config', 'bootstrap', '--repository', 'test.borg', 'list')
  201. def test_parse_arguments_allows_archive_with_extract():
  202. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  203. module.parse_arguments('--config', 'myconfig', 'extract', '--archive', 'test')
  204. def test_parse_arguments_allows_archive_with_mount():
  205. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  206. module.parse_arguments(
  207. '--config', 'myconfig', 'mount', '--archive', 'test', '--mount-point', '/mnt'
  208. )
  209. def test_parse_arguments_allows_archive_with_restore():
  210. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  211. module.parse_arguments('--config', 'myconfig', 'restore', '--archive', 'test')
  212. def test_parse_arguments_allows_archive_with_list():
  213. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  214. module.parse_arguments('--config', 'myconfig', 'list', '--archive', 'test')
  215. def test_parse_arguments_requires_archive_with_extract():
  216. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  217. with pytest.raises(SystemExit):
  218. module.parse_arguments('--config', 'myconfig', 'extract')
  219. def test_parse_arguments_requires_archive_with_restore():
  220. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  221. with pytest.raises(SystemExit):
  222. module.parse_arguments('--config', 'myconfig', 'restore')
  223. def test_parse_arguments_requires_mount_point_with_mount():
  224. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  225. with pytest.raises(SystemExit):
  226. module.parse_arguments('--config', 'myconfig', 'mount', '--archive', 'test')
  227. def test_parse_arguments_requires_mount_point_with_umount():
  228. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  229. with pytest.raises(SystemExit):
  230. module.parse_arguments('--config', 'myconfig', 'umount')
  231. def test_parse_arguments_allows_progress_before_create():
  232. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  233. module.parse_arguments('--progress', 'create', 'list')
  234. def test_parse_arguments_allows_progress_after_create():
  235. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  236. module.parse_arguments('create', '--progress', 'list')
  237. def test_parse_arguments_allows_progress_and_extract():
  238. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  239. module.parse_arguments('--progress', 'extract', '--archive', 'test', 'list')
  240. def test_parse_arguments_disallows_progress_without_create():
  241. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  242. with pytest.raises(ValueError):
  243. module.parse_arguments('--progress', 'list')
  244. def test_parse_arguments_with_stats_and_create_flags_does_not_raise():
  245. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  246. module.parse_arguments('--stats', 'create', 'list')
  247. def test_parse_arguments_with_stats_and_prune_flags_does_not_raise():
  248. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  249. module.parse_arguments('--stats', 'prune', 'list')
  250. def test_parse_arguments_with_stats_flag_but_no_create_or_prune_flag_raises_value_error():
  251. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  252. with pytest.raises(ValueError):
  253. module.parse_arguments('--stats', 'list')
  254. def test_parse_arguments_with_list_and_create_flags_does_not_raise():
  255. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  256. module.parse_arguments('--list', 'create')
  257. def test_parse_arguments_with_list_and_prune_flags_does_not_raise():
  258. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  259. module.parse_arguments('--list', 'prune')
  260. def test_parse_arguments_with_list_flag_but_no_relevant_action_raises_value_error():
  261. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  262. with pytest.raises(SystemExit):
  263. module.parse_arguments('--list', 'rcreate')
  264. def test_parse_arguments_disallows_list_with_progress_for_create_action():
  265. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  266. with pytest.raises(ValueError):
  267. module.parse_arguments('create', '--list', '--progress')
  268. def test_parse_arguments_disallows_list_with_json_for_create_action():
  269. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  270. with pytest.raises(ValueError):
  271. module.parse_arguments('create', '--list', '--json')
  272. def test_parse_arguments_allows_json_with_list_or_info():
  273. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  274. module.parse_arguments('list', '--json')
  275. module.parse_arguments('info', '--json')
  276. def test_parse_arguments_disallows_json_with_both_list_and_info():
  277. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  278. with pytest.raises(ValueError):
  279. module.parse_arguments('list', 'info', '--json')
  280. def test_parse_arguments_disallows_json_with_both_list_and_rinfo():
  281. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  282. with pytest.raises(ValueError):
  283. module.parse_arguments('list', 'rinfo', '--json')
  284. def test_parse_arguments_disallows_json_with_both_rinfo_and_info():
  285. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  286. with pytest.raises(ValueError):
  287. module.parse_arguments('rinfo', 'info', '--json')
  288. def test_parse_arguments_disallows_transfer_with_both_archive_and_match_archives():
  289. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  290. with pytest.raises(ValueError):
  291. module.parse_arguments(
  292. 'transfer',
  293. '--source-repository',
  294. 'source.borg',
  295. '--archive',
  296. 'foo',
  297. '--match-archives',
  298. 'sh:*bar',
  299. )
  300. def test_parse_arguments_disallows_list_with_both_prefix_and_match_archives():
  301. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  302. with pytest.raises(ValueError):
  303. module.parse_arguments('list', '--prefix', 'foo', '--match-archives', 'sh:*bar')
  304. def test_parse_arguments_disallows_rlist_with_both_prefix_and_match_archives():
  305. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  306. with pytest.raises(ValueError):
  307. module.parse_arguments('rlist', '--prefix', 'foo', '--match-archives', 'sh:*bar')
  308. def test_parse_arguments_disallows_info_with_both_archive_and_match_archives():
  309. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  310. with pytest.raises(ValueError):
  311. module.parse_arguments('info', '--archive', 'foo', '--match-archives', 'sh:*bar')
  312. def test_parse_arguments_disallows_info_with_both_archive_and_prefix():
  313. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  314. with pytest.raises(ValueError):
  315. module.parse_arguments('info', '--archive', 'foo', '--prefix', 'bar')
  316. def test_parse_arguments_disallows_info_with_both_prefix_and_match_archives():
  317. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  318. with pytest.raises(ValueError):
  319. module.parse_arguments('info', '--prefix', 'foo', '--match-archives', 'sh:*bar')
  320. def test_parse_arguments_check_only_extract_does_not_raise_extract_subparser_error():
  321. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  322. module.parse_arguments('check', '--only', 'extract')
  323. def test_parse_arguments_extract_archive_check_does_not_raise_check_subparser_error():
  324. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  325. module.parse_arguments('extract', '--archive', 'check')
  326. def test_parse_arguments_extract_with_check_only_extract_does_not_raise():
  327. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  328. module.parse_arguments('extract', '--archive', 'name', 'check', '--only', 'extract')
  329. def test_parse_arguments_bootstrap_without_config_errors():
  330. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  331. with pytest.raises(ValueError):
  332. module.parse_arguments('bootstrap')
  333. def test_parse_arguments_config_with_no_subaction_errors():
  334. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  335. with pytest.raises(ValueError):
  336. module.parse_arguments('config')
  337. def test_parse_arguments_config_with_help_shows_config_help(capsys):
  338. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  339. with pytest.raises(SystemExit) as exit:
  340. module.parse_arguments('config', '--help')
  341. assert exit.value.code == 0
  342. captured = capsys.readouterr()
  343. assert 'global arguments:' not in captured.out
  344. assert 'config arguments:' in captured.out
  345. assert 'config sub-actions:' in captured.out
  346. def test_parse_arguments_config_with_subaction_but_missing_flags_errors():
  347. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  348. with pytest.raises(SystemExit) as exit:
  349. module.parse_arguments('config', 'bootstrap')
  350. assert exit.value.code == 2
  351. def test_parse_arguments_config_with_subaction_and_help_shows_subaction_help(capsys):
  352. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  353. with pytest.raises(SystemExit) as exit:
  354. module.parse_arguments('config', 'bootstrap', '--help')
  355. assert exit.value.code == 0
  356. captured = capsys.readouterr()
  357. assert 'config bootstrap arguments:' in captured.out
  358. def test_parse_arguments_config_with_subaction_and_required_flags_does_not_raise():
  359. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  360. module.parse_arguments('config', 'bootstrap', '--repository', 'repo.borg')
  361. def test_parse_arguments_config_with_subaction_and_global_flags_at_start_does_not_raise():
  362. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  363. module.parse_arguments('--verbosity', '1', 'config', 'bootstrap', '--repository', 'repo.borg')
  364. def test_parse_arguments_config_with_subaction_and_global_flags_at_end_does_not_raise():
  365. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  366. module.parse_arguments('config', 'bootstrap', '--repository', 'repo.borg', '--verbosity', '1')
  367. def test_parse_arguments_config_with_subaction_and_explicit_config_file_does_not_raise():
  368. flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
  369. module.parse_arguments(
  370. 'config', 'bootstrap', '--repository', 'repo.borg', '--config', 'test.yaml'
  371. )