[pve-devel] [PATCH installer v4 05/12] auto-installer: tests: simplify empty disks check
Christoph Heiss
c.heiss at proxmox.com
Mon Nov 11 14:15:01 CET 2024
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
Changes v3 -> v4:
* no changes
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.47.0
More information about the pve-devel
mailing list