From d2515450f8c356fbf0b57b580ef7f627de5774a0 Mon Sep 17 00:00:00 2001 From: lykimq Date: Wed, 1 Mar 2023 17:24:26 +0100 Subject: [PATCH] Alcotezt: port [src/lib_proxy_server_config] --- manifest/main.ml | 6 +++--- opam/tezos-proxy-server-config.opam | 4 +++- src/lib_proxy_server_config/test/dune | 30 +++++++++++++++++++++------ tezt/tests/dune | 1 + 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/manifest/main.ml b/manifest/main.ml index ef683f6bdbec..3ef4875c4731 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -3106,8 +3106,8 @@ let octez_proxy_server_config = ~deps:[octez_base |> open_ ~m:"TzPervasives"; octez_stdlib_unix; uri] let _octez_proxy_server_config_tests = - test - "test_proxy_server_config" + tezt + ["test_proxy_server_config"] ~path:"src/lib_proxy_server_config/test" ~opam:"tezos-proxy-server-config" ~deps: @@ -3117,7 +3117,7 @@ let _octez_proxy_server_config_tests = octez_proxy_server_config; octez_test_helpers |> open_; qcheck_alcotest; - alcotest_lwt; + alcotezt; uri; ] diff --git a/opam/tezos-proxy-server-config.opam b/opam/tezos-proxy-server-config.opam index 487d0ca6c5ab..9a9cf74e7bfe 100644 --- a/opam/tezos-proxy-server-config.opam +++ b/opam/tezos-proxy-server-config.opam @@ -13,13 +13,15 @@ depends: [ "tezos-base" "tezos-stdlib-unix" "uri" { >= "3.1.0" } + "tezt" { with-test & >= "3.0.0" } "tezos-test-helpers" {with-test} "qcheck-alcotest" { with-test & >= "0.20" } - "alcotest-lwt" { with-test & >= "1.5.0" } + "octez-alcotezt" {with-test} ] build: [ ["rm" "-r" "vendors"] ["dune" "build" "-p" name "-j" jobs] ["dune" "runtest" "-p" name "-j" jobs] {with-test} + ["dune" "build" "@runtezt" "-p" name "-j" jobs] {with-test} ] synopsis: "Tezos: proxy server configuration" diff --git a/src/lib_proxy_server_config/test/dune b/src/lib_proxy_server_config/test/dune index 2fa1faabec7e..d977db71c411 100644 --- a/src/lib_proxy_server_config/test/dune +++ b/src/lib_proxy_server_config/test/dune @@ -1,22 +1,40 @@ ; This file was automatically generated, do not edit. ; Edit file manifest/main.ml instead. -(executable - (name test_proxy_server_config) +(library + (name src_lib_proxy_server_config_test_tezt_lib) + (instrumentation (backend bisect_ppx)) (libraries + tezt.core tezos-base tezos-base.unix tezos-proxy-server-config tezos-test-helpers qcheck-alcotest - alcotest-lwt + octez-alcotezt uri) + (library_flags (:standard -linkall)) (flags (:standard) + -open Tezt_core + -open Tezt_core.Base -open Tezos_base.TzPervasives - -open Tezos_test_helpers)) + -open Tezos_test_helpers + -open Octez_alcotezt) + (modules test_proxy_server_config)) + +(executable + (name main) + (libraries + src_lib_proxy_server_config_test_tezt_lib + tezt) + (modules main)) (rule - (alias runtest) + (alias runtezt) (package tezos-proxy-server-config) - (action (run %{dep:./test_proxy_server_config.exe}))) + (action (run %{dep:./main.exe}))) + +(rule + (targets main.ml) + (action (with-stdout-to %{targets} (echo "let () = Tezt.Test.run ()")))) diff --git a/tezt/tests/dune b/tezt/tests/dune index d80ea36d8acb..df89f9af13c5 100644 --- a/tezt/tests/dune +++ b/tezt/tests/dune @@ -47,6 +47,7 @@ src_lib_shell_test_tezt_lib src_lib_sapling_test_tezt_lib src_lib_requester_test_tezt_lib + src_lib_proxy_server_config_test_tezt_lib src_lib_p2p_tezt_tezt_lib src_lib_mockup_test_tezt_lib src_lib_lwt_result_stdlib_test_tezt_lib -- GitLab