mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-12 14:48:13 +00:00
agent: Cleanup config
This commit clean up config parsing and testing code to make it a bit more easy to maintain. - Adds `with_context` from anyhow to include the underlying error. This helps to understand what exactly went wrong. - Uses ensure and bail as a shorter alternative for `if` checks. - TestData in test_parse_cmdline is now implements Default to reduce boilerplate code - Remove `make_err` as it doesn’t make any sense. Fixes: #2177 Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
3fe0af6a9b
commit
e6b1766f6b