File tree Expand file tree Collapse file tree 4 files changed +17
-23
lines changed Expand file tree Collapse file tree 4 files changed +17
-23
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ let default = Executor.default
1919
2020type format = Precomputed | Extensional
2121
22- let path =
22+ let path () =
2323 Deferred. map Executor.PathFinder. standalone_path ~f: (fun opt ->
2424 Option. value_exn opt
2525 ~message:
26- " Could not find standalone path. App is not executable outside the \
27- dune" )
26+ " Could not find standalone path for archive blocks . App is not \
27+ executable outside the dune" )
2828
2929let format_to_string format =
3030 match format with
Original file line number Diff line number Diff line change 1313
1414module PathFinder = Executor. Make_PathFinder (Paths )
1515
16- let path =
16+ let path () =
1717 Deferred. map PathFinder. standalone_path ~f: (fun opt ->
1818 Option. value_exn opt
1919 ~message:
20- " Could not find standalone path. App is not executable outside the \
21- dune" )
20+ " Could not find standalone path for missing block auditor. App is \
21+ not executable outside the dune" )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ module Config = struct
1414 ; run_mode : mode
1515 ; missing_blocks_auditor : string
1616 ; archive_blocks : string
17- ; block_format : Archive_blocks .format
17+ ; block_format : [ `Precomputed | `Extensional ]
1818 }
1919
2020 let to_args t =
@@ -34,7 +34,7 @@ module Config = struct
3434 ; (" DB_PORT" , Int. to_string (Option. value_exn (Uri. port t.archive_uri)))
3535 ; (" DB_NAME" , path_no_leading_slash)
3636 ; (" PGPASSWORD" , Option. value_exn (Uri. password t.archive_uri))
37- ; (" BLOCKS_FORMAT" , Archive_blocks. format_to_string t.block_format)
37+ ; (" BLOCKS_FORMAT" , ( match t.block_format with `Precomputed -> " precomputed " | `Extensional -> " extensional " ) )
3838 ; (" MISSING_BLOCKS_AUDITOR" , t.missing_blocks_auditor)
3939 ; (" ARCHIVE_BLOCKS" , t.archive_blocks)
4040 ]
Original file line number Diff line number Diff line change @@ -3,38 +3,32 @@ open Core
33open Mina_automation_fixture
44
55let run (module F : Intf.Fixture ) =
6- let open Deferred.Let_syntax in
76 let % bind test_case_after_setup =
8- match % bind. Deferred F. setup () with
7+ match % bind F. setup () with
98 | Ok t ->
109 return t
1110 | Error err ->
1211 failwithf " Setup failed with error: %s" (Error. to_string_hum err) ()
1312 in
1413 Monitor. protect
1514 ~finally: (fun () ->
16- match % bind F. teardown test_case_after_setup with
15+ match % map F. teardown test_case_after_setup with
1716 | Ok () ->
18- Deferred. unit
17+ ()
1918 | Error err ->
20- eprintf " Teardown failed with error: %s\n " (Error. to_string_hum err) ;
21- Deferred. unit )
19+ eprintf " Teardown failed with error: %s\n " (Error. to_string_hum err)
20+ )
2221 (fun () ->
23- match % bind. Deferred F. test_case test_case_after_setup with
22+ match % bind F. test_case test_case_after_setup with
2423 | Ok result ->
2524 return result
2625 | Error err ->
27- let % map _ = F. on_test_fail test_case_after_setup in
26+ let % map () = F. on_test_fail test_case_after_setup in
2827 Intf. Failed (Error. to_string_hum err) )
2928
3029let run_blocking test_case () =
31- let (result : Intf.test_result ) =
32- Async.Thread_safe. block_on_async_exn (fun () -> run test_case)
33- in
34- match result with
30+ match Async.Thread_safe. block_on_async_exn (fun () -> run test_case) with
3531 | Intf. Passed ->
3632 ()
37- | Intf. Warning msg ->
38- Alcotest. fail msg
39- | Intf. Failed msg ->
33+ | Warning msg | Failed msg ->
4034 Alcotest. fail msg
You can’t perform that action at this time.
0 commit comments