[pve-devel] [PATCH proxmox v3 01/14] notify: renderer: adapt to changes in proxmox-time
Lukas Wagner
l.wagner at proxmox.com
Fri Nov 8 15:41:11 CET 2024
A recent commit [1] changed the `Display` implementation of `TimeSpan` such
that minutes are now displayed as `20m` instead of `20min`.
This commit adapts the tests for the notification template renderer
accordingly.
[1] 19129960 ("time: display minute/month such that it can be parsed again")
Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
proxmox-notify/src/renderer/mod.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxmox-notify/src/renderer/mod.rs b/proxmox-notify/src/renderer/mod.rs
index 8574a3fb..82473d03 100644
--- a/proxmox-notify/src/renderer/mod.rs
+++ b/proxmox-notify/src/renderer/mod.rs
@@ -329,8 +329,8 @@ mod tests {
Some("1 KiB".to_string())
);
- assert_eq!(value_to_duration(&json!(60)), Some("1min ".to_string()));
- assert_eq!(value_to_duration(&json!("60")), Some("1min ".to_string()));
+ assert_eq!(value_to_duration(&json!(60)), Some("1m".to_string()));
+ assert_eq!(value_to_duration(&json!("60")), Some("1m".to_string()));
// The rendered value is in localtime, so we only check if the result is `Some`...
// ... otherwise the test will break in another timezone :S
--
2.39.5
More information about the pve-devel
mailing list