[pve-devel] [PATCH proxmox 2/2] notify: fix tests if not all features are enabled

Lukas Wagner l.wagner at proxmox.com
Mon Jul 24 14:31:25 CEST 2023


Some tests are now disabled if not all required features are enabled.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 proxmox-notify/src/api/mod.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify/src/api/mod.rs
index a4e0e40f..9372443a 100644
--- a/proxmox-notify/src/api/mod.rs
+++ b/proxmox-notify/src/api/mod.rs
@@ -226,12 +226,13 @@ fn get_referenced_entities(config: &Config, entity: &str) -> HashSet<String> {
 mod test_helpers {
     use crate::Config;
 
+    #[allow(unused)]
     pub fn empty_config() -> Config {
         Config::new("", "").unwrap()
     }
 }
 
-#[cfg(test)]
+#[cfg(all(test, gotify, sendmail))]
 mod tests {
     use super::*;
     use crate::endpoints::gotify::{GotifyConfig, GotifyPrivateConfig};
-- 
2.39.2






More information about the pve-devel mailing list