diff options
author | rtkay123 <dev@kanjala.com> | 2025-08-21 17:59:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-21 17:59:13 +0200 |
commit | 06421ed5455285eb5d5eb90ea689fa73ad0f3010 (patch) | |
tree | e7a56bb6ae95d9f6f84664c94fc2efb3758f6539 /crates/configuration/src/server/http_svc/routes.rs | |
parent | 441196248603a7c1aed66e4c0a4342aeb06dca8f (diff) | |
download | warden-06421ed5455285eb5d5eb90ea689fa73ad0f3010.tar.bz2 warden-06421ed5455285eb5d5eb90ea689fa73ad0f3010.zip |
tests: cov (#13)
Diffstat (limited to 'crates/configuration/src/server/http_svc/routes.rs')
-rw-r--r-- | crates/configuration/src/server/http_svc/routes.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/configuration/src/server/http_svc/routes.rs b/crates/configuration/src/server/http_svc/routes.rs index 92f3184..64fc4c3 100644 --- a/crates/configuration/src/server/http_svc/routes.rs +++ b/crates/configuration/src/server/http_svc/routes.rs @@ -31,3 +31,17 @@ pub fn router(store: AppHandle) -> OpenApiRouter { )) .with_state(store) } + +#[cfg(test)] +pub(crate) fn test_config() -> warden_stack::Configuration { + use warden_stack::Configuration; + + let config_path = "warden-config.toml"; + + let config = config::Config::builder() + .add_source(config::File::new(config_path, config::FileFormat::Toml)) + .build() + .unwrap(); + + config.try_deserialize::<Configuration>().unwrap() +} |