From b087aba40e125178305f8214aaa360271cc18408 Mon Sep 17 00:00:00 2001 From: swrup Date: Sat, 21 Feb 2026 23:40:58 +0100 Subject: [PATCH] --- test/auditor_public_key | 1 - test/offline_management.sh | 4 ++-- test/test.ml | 6 +++--- tools/gen_registry_files.ml | 10 +++++++++- tools/offline_impl.ml | 3 +++ 5 files changed, 17 insertions(+), 7 deletions(-) delete mode 100644 test/auditor_public_key diff --git a/test/auditor_public_key b/test/auditor_public_key deleted file mode 100644 index 4b97fccf..00000000 --- a/test/auditor_public_key +++ /dev/null @@ -1 +0,0 @@ -A17JXR3E6J4CXDPYT7S1H25PGJ3ABS26TQ38654QCX0TB59RPMF0 diff --git a/test/offline_management.sh b/test/offline_management.sh index 119c46e0..e8a22785 100755 --- a/test/offline_management.sh +++ b/test/offline_management.sh @@ -6,9 +6,9 @@ a="/tmp/a.json" b="/tmp/b.json" url="http://localhost:3434" -auditor_pub=$(<"./test/auditor_public_key") +auditor_pub="A17JXR3E6J4CXDPYT7S1H25PGJ3ABS26TQ38654QCX0TB59RPMF0" master_key="./default/master_offline_private_key" -zero_euro="EUR:0.0" +zero_euro="KUDO:0.0" offline_tool() { dune exec offline -- "$@" > /dev/null diff --git a/test/test.ml b/test/test.ml index 58b19438..c9af9bd5 100644 --- a/test/test.ml +++ b/test/test.ml @@ -48,16 +48,16 @@ let () = let () = let open Amount in let v = - make ~sign:(Some Sign_plus) ~currency:"EUR" ~value:(Int64.of_int 25) + make ~sign:(Some Sign_plus) ~currency:"KUDO" ~value:(Int64.of_int 25) ~fraction:(Int32.of_int 678) |> Result.get_ok in let s = to_string v in let v' = of_string s |> Result.get_ok in assert (v = v'); - let r = of_string {|~EUR:4.9|} in + let r = of_string {|~KUDO:4.9|} in assert (Result.is_error r); - let r = of_string {|+EUR:4.99999999999999999999999|} in + let r = of_string {|+KUDO:4.99999999999999999999999|} in assert (Result.is_error r); () diff --git a/tools/gen_registry_files.ml b/tools/gen_registry_files.ml index ebaae034..e3ca917d 100644 --- a/tools/gen_registry_files.ml +++ b/tools/gen_registry_files.ml @@ -41,7 +41,15 @@ let download ~tmp ~url = let res = OS.Cmd.run Cmd.( - v "curl" % "--silent" % "--show-error" % "-o" % tmp % "-X" % "GET" % url) + v "curl" + % "--silent" + % "--show-error" + % "--fail" + % "-o" + % tmp + % "-X" + % "GET" + % url) in match res with | Error (`Msg s) -> Fmt.failwith "download failure: %s" s diff --git a/tools/offline_impl.ml b/tools/offline_impl.ml index aa0d08e3..f8c1c895 100644 --- a/tools/offline_impl.ml +++ b/tools/offline_impl.ml @@ -158,6 +158,7 @@ let download ~output ~url = v "curl" % "--silent" % "--show-error" + % "--fail" % "-o" % output % "-X" @@ -171,6 +172,8 @@ let upload ~input ~url = Cmd.( v "curl" % "--silent" + % "--show-error" + % "--fail" % "-i" % "-X" % "POST"