Browse Source

Fix DiskType test: use HardDrive variant matching Go's HddType=""

Go maps both "" and "hdd" to HardDriveType (empty string). The
Rust enum variant is HardDrive, not Hdd. The test referenced a
nonexistent Hdd variant causing compilation failure.
rust-volume-server
Chris Lu 2 days ago
parent
commit
dd9af492f2
  1. 2
      seaweed-volume/src/storage/types.rs

2
seaweed-volume/src/storage/types.rs

@ -625,7 +625,7 @@ mod tests {
#[test]
fn test_disk_type() {
assert_eq!(DiskType::from_string(""), DiskType::HardDrive);
assert_eq!(DiskType::from_string("hdd"), DiskType::Hdd);
assert_eq!(DiskType::from_string("hdd"), DiskType::HardDrive);
assert_eq!(DiskType::from_string("SSD"), DiskType::Ssd);
assert_eq!(
DiskType::from_string("nvme"),

Loading…
Cancel
Save