()
| 247 | |
| 248 | #[test] |
| 249 | fn detect_qcow2_image() { |
| 250 | let tmp = TempFile::new().unwrap(); |
| 251 | { |
| 252 | let raw = RawFile::new(tmp.as_file().try_clone().unwrap(), false); |
| 253 | let mut qcow = QcowFile::new(raw, 3, 100 * 1024 * 1024, true).unwrap(); |
| 254 | qcow.flush().unwrap(); |
| 255 | } |
| 256 | let path = tmp.as_path().to_owned(); |
| 257 | let options = default_options(&path); |
| 258 | let opened = open_disk(&options).unwrap(); |
| 259 | assert_eq!(opened.image_type, ImageType::Qcow2); |
| 260 | } |
| 261 | |
| 262 | #[test] |
| 263 | fn open_readonly() { |
nothing calls this directly
no test coverage detected