aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs11+11 −0
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index dd55bfc..4be4026 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -91,3 +91,14 @@ impl ConfigService {
&self.dirname
}
}
+
+#[cfg(test)]
+impl ConfigService {
+ pub fn for_test(dirname: PathBuf) -> Self {
+ Self {
+ listen: "127.0.0.1:0".to_string(),
+ appname: "test".to_string(),
+ dirname,
+ }
+ }
+}