diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-03-02 05:11:10 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-03-02 05:21:36 +0000 |
commit | 21fef55ca4907aa9872754f20320c24c7f8a5fac (patch) | |
tree | d88613f6539be1382e08ffa7846755a4ec66002f /java | |
parent | eb54a7ede43d9275f10db6fce1472256550da0eb (diff) | |
download | libguestfs-21fef55ca4907aa9872754f20320c24c7f8a5fac.tar.gz libguestfs-21fef55ca4907aa9872754f20320c24c7f8a5fac.tar.xz libguestfs-21fef55ca4907aa9872754f20320c24c7f8a5fac.zip |
java: Add a test of g.list_filesystems (a function that returns a Map).
Diffstat (limited to 'java')
-rw-r--r-- | java/t/GuestFS010Basic.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/t/GuestFS010Basic.java b/java/t/GuestFS010Basic.java index 137fad3c..84b96f8e 100644 --- a/java/t/GuestFS010Basic.java +++ b/java/t/GuestFS010Basic.java @@ -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"); |