File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -580,6 +580,24 @@ functor
580
580
let (_ : string ) = Client. db_get_by_uuid t " VM" invalid_uuid in
581
581
failwith " db_get_by_uuid <invalid uuid>"
582
582
) ;
583
+ Printf. printf " db_get_by_uuid_opt <valid uuid>\n " ;
584
+ let r = Client. db_get_by_uuid_opt t " VM" valid_uuid in
585
+ ( if r <> Some valid_ref then
586
+ let rs = Option. fold ~none: " None" ~some: Fun. id r in
587
+ failwith
588
+ (Printf. sprintf
589
+ " db_get_by_uuid_opt <valid uuid>: got %s; expected %s" rs
590
+ valid_ref
591
+ )
592
+ ) ;
593
+ Printf. printf " db_get_by_uuid_opt <invalid uuid>\n " ;
594
+ let r = Client. db_get_by_uuid_opt t " VM" invalid_uuid in
595
+ if not (Option. is_none r) then
596
+ failwith
597
+ (Printf. sprintf
598
+ " db_get_by_uuid_opt <invalid uuid>: got %s; expected None"
599
+ valid_ref
600
+ ) ;
583
601
Printf. printf " get_by_name_label <invalid name label>\n " ;
584
602
if Client. db_get_by_name_label t " VM" invalid_name <> [] then
585
603
failwith " db_get_by_name_label <invalid name label>" ;
You can’t perform that action at this time.
0 commit comments