mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
java: Add a test of g.list_filesystems (a function that returns a Map).
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Map;
|
||||
import com.redhat.et.libguestfs.*;
|
||||
|
||||
public class GuestFS010Basic
|
||||
@@ -45,6 +46,15 @@ public class GuestFS010Basic
|
||||
assert lvs[0].equals ("/dev/VG/LV1");
|
||||
assert lvs[1].equals ("/dev/VG/LV2");
|
||||
|
||||
g.mkfs ("ext2", "/dev/VG/LV1");
|
||||
|
||||
Map<String,String> m = g.list_filesystems ();
|
||||
assert m.containsKey ("/dev/VG/LV1");
|
||||
assert m.size () == 2;
|
||||
|
||||
assert m.get ("/dev/VG/LV1").equals ("ext2");
|
||||
assert m.get ("/dev/VG/LV2").equals ("unknown");
|
||||
|
||||
g.close ();
|
||||
|
||||
File f2 = new File ("test.img");
|
||||
|
||||
Reference in New Issue
Block a user