Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
test.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23open Core let params = lazy ( [ "MSSQL_TEST_SERVER" ; "MSSQL_TEST_DATABASE" ; "MSSQL_TEST_USERNAME" ; "MSSQL_TEST_PASSWORD" ; "MSSQL_TEST_PORT" ] |> List.map ~f:Sys.getenv |> function | [ Some host ; Some db ; Some user ; Some password ; Some port ] -> host, db, user, password, port | _ -> raise (OUnitTest.Skip "MSSQL_TEST_* environment not set")) let with_conn f = let host, db, user, password, port = Lazy.force params in Client.with_conn ~host ~db ~user ~password ~port f let with_pool ?max_connections f = let host, db, user, password, port = Lazy.force params in Client.Pool.with_pool ~host ~db ~user ~password ~port ?max_connections f