Skip to content

Commit 3366248

Browse files
author
David Scott
committed
Add Volume.create test
Signed-off-by: David Scott <dave.scott@citrix.com>
1 parent 47013fc commit 3366248

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

examples/volume/org.xen.xcp.storage.plainlvm/Volume.create

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,23 @@ end
4040
module Test = struct
4141
open OUnit
4242

43-
let test common = ()
43+
let test_lvcreate () =
44+
let vol = Lvm.make_temp_volume () in
45+
let vg_name = "hello" in
46+
finally
47+
(fun () ->
48+
Lvm.vgcreate vg_name [ vol ];
49+
Lvm.lvcreate vg_name "testvol" 1L;
50+
Lvm.lvremove vg_name "testvol"
51+
) (fun () ->
52+
Lvm.remove_temp_volume vol
53+
)
54+
55+
let test common =
56+
let suite = "create" >::: [
57+
"lvcreate" >:: test_lvcreate;
58+
] in
59+
ignore(run_test_tt ~verbose:common.Common.verbose suite)
4460
end
4561

4662
module M = Make(Command)(Test)

0 commit comments

Comments
 (0)