wip cram test
This commit is contained in:
parent
6d73af2169
commit
8bb9d35dda
5 changed files with 15 additions and 38 deletions
|
|
@ -4,6 +4,11 @@
|
|||
(libraries mte mirage-crypto-rng.unix))
|
||||
|
||||
(executable
|
||||
(name validate_response)
|
||||
(modules validate_response)
|
||||
(public_name mte-validate)
|
||||
(name validate)
|
||||
(modules validate)
|
||||
(libraries mte bos cmdliner))
|
||||
|
||||
(cram
|
||||
(deps
|
||||
(file "keys.demo.taler.net.v31_0_9.json")))
|
||||
|
|
|
|||
|
|
@ -121,16 +121,16 @@ open Cmdliner
|
|||
open Cmdliner.Term.Syntax
|
||||
|
||||
let keys_cmd =
|
||||
let input =
|
||||
let doc = "input file" in
|
||||
Arg.(required & opt (some filepath) None & info [ "i"; "input" ] ~doc)
|
||||
let file =
|
||||
let doc = "JSON file with /keys response" in
|
||||
Arg.(required & pos 0 (some filepath) None & info [] ~doc)
|
||||
in
|
||||
let doc = "validate a /keys JSON response" in
|
||||
let doc = "Validate a /keys response" in
|
||||
Cmd.make (Cmd.info "keys" ~doc)
|
||||
@@
|
||||
let+ input = input in
|
||||
let+ file = file in
|
||||
let* content =
|
||||
Result.bind (Fpath.of_string input) Bos.OS.File.read |> unwrap_msg
|
||||
Result.bind (Fpath.of_string file) Bos.OS.File.read |> unwrap_msg
|
||||
in
|
||||
keys content
|
||||
|
||||
1
test/validate.t
Normal file
1
test/validate.t
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ mte-validate keys keys.demo.taler.net.v31_0_9.json
|
||||
Loading…
Add table
Add a link
Reference in a new issue