fn test_get_vm_id_gen2()

in libazureinit/src/status.rs [398:418]


    fn test_get_vm_id_gen2() {
        let tmpdir = TempDir::new().unwrap();
        let vm_uuid_path = tmpdir.path().join("product_uuid");
        fs::write(&vm_uuid_path, "550e8400-e29b-41d4-a716-446655440000")
            .unwrap();

        // Create a mock EFI directory => at least one path exists => Gen2
        let mock_efi_dir = tmpdir.path().join("mock_efi");
        fs::create_dir(&mock_efi_dir).unwrap();

        let res = private_get_vm_id(
            Some(vm_uuid_path.to_str().unwrap()),
            Some(mock_efi_dir.to_str().unwrap()),
            None,
        );
        assert_eq!(
            res.unwrap(),
            "550e8400-e29b-41d4-a716-446655440000",
            "Should not byte-swap for Gen2"
        );
    }