summaryrefslogtreecommitdiff
path: root/test/schema.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/schema.ml')
-rw-r--r--test/schema.ml7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/schema.ml b/test/schema.ml
index 3b52812..5fcd406 100644
--- a/test/schema.ml
+++ b/test/schema.ml
@@ -25,8 +25,7 @@ let get_schema : Caqti_lwt.connection -> string -> string Lwt.t =
let exec : string list -> t =
fun tables ->
- let stdin = In_channel.input_all stdin in
+ let stdin = Common.read_stdin () in
let+ configuration = Configuration.Read_conf.read_string_conf stdin in
- Lwt_main.run
- (let* db = Common.connect configuration in
- Lwt_list.map_s (get_schema db) (List.rev tables))
+ Common.with_db configuration (fun db ->
+ Lwt_list.map_s (get_schema db) (List.rev tables))