aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-23 10:54:09 +0100
committerDaniel Mueller <deso@posteo.net>2020-09-01 21:12:43 -0700
commit3f430bac70a946c776a930fabc5b64a788113452 (patch)
treeb1989fd259a159eb7982002155dc8b482948c1cd /src/tests
parentbb592ad9909c84c3c72252e1775b1cd2abc1e881 (diff)
downloadnitrocli-3f430bac70a946c776a930fabc5b64a788113452.tar.gz
nitrocli-3f430bac70a946c776a930fabc5b64a788113452.tar.bz2
Implement configuration handling
This patch implements basic configuration handling that reads a configuration file and stores the parsed data in the ExecCtx and RunCtx structs. It supports three configuration items: - model (previously only --model) - no_cache (previously only NITROCLI_NO_CACHE) - verbosity (previously only --verbose)
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tests/mod.rs b/src/tests/mod.rs
index f26ab80..9477964 100644
--- a/src/tests/mod.rs
+++ b/src/tests/mod.rs
@@ -115,7 +115,10 @@ impl Nitrocli {
new_admin_pin: self.new_admin_pin.clone(),
new_user_pin: self.new_user_pin.clone(),
password: self.password.clone(),
- no_cache: true,
+ config: crate::config::Config {
+ no_cache: true,
+ ..Default::default()
+ },
};
(f(ctx, args), stdout, stderr)