[pve-devel] [PATCH installer v3 13/20] auto-installer: tests: simplify empty disks check

Christoph Heiss c.heiss at proxmox.com
Wed Aug 21 11:40:15 CEST 2024


Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
Changes v2 -> v3:
  * no changes

Changes v1 -> v2:
  * new patch, suggestion by Stefan

 proxmox-auto-installer/tests/parse-answer.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/proxmox-auto-installer/tests/parse-answer.rs b/proxmox-auto-installer/tests/parse-answer.rs
index 450915a..72bddaa 100644
--- a/proxmox-auto-installer/tests/parse-answer.rs
+++ b/proxmox-auto-installer/tests/parse-answer.rs
@@ -40,9 +40,7 @@ pub fn setup_test_basic(path: &Path) -> (SetupInfo, LocaleInfo, RuntimeInfo, Ude
     };
 
     runtime_info.disks.sort();
-    if runtime_info.disks.is_empty() {
-        panic!("disk list is empty!");
-    }
+    assert!(!runtime_info.disks.is_empty(), "disk list cannot be empty");
 
     (installer_info, locale_info, runtime_info, udev_info)
 }
-- 
2.45.2





More information about the pve-devel mailing list