From 8068bba9f801712db5ed5fde1ee8b8b7f4ace06d Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Mon, 29 Jul 2019 12:58:47 +0200 Subject: [PATCH] Add dummy Rekognition test to succeed the build --- .../lib_test/aws_rekognition_test.ml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 libraries/rekognition/lib_test/aws_rekognition_test.ml diff --git a/libraries/rekognition/lib_test/aws_rekognition_test.ml b/libraries/rekognition/lib_test/aws_rekognition_test.ml new file mode 100644 index 000000000..e0a9b87ee --- /dev/null +++ b/libraries/rekognition/lib_test/aws_rekognition_test.ml @@ -0,0 +1,44 @@ +open OUnit +open Aws_rds + +module TestSuite(Runtime : sig + type 'a m + val run_request : + region:string + -> (module Aws.Call with type input = 'input + and type output = 'output + and type error = 'error) + -> 'input + -> [`Ok of 'output | `Error of 'error Aws.Error.t] m + val un_m : 'a m -> 'a + end) = struct + + let noop_test () = + "Noop Rekognition test succeeds" + @?false + + let test_cases = + [ "Rekognition noop" >:: noop_test ] + + let rec was_successful = + function + | [] -> true + | RSuccess _::t + | RSkip _::t -> + was_successful t + | RFailure _::_ + | RError _::_ + | RTodo _::_ -> + false + let _ = + let suite = "Tests" >::: test_cases in + let verbose = ref false in + let set_verbose _ = verbose := true in + Arg.parse + [("-verbose", Arg.Unit set_verbose, "Run the test in verbose mode.");] + (fun x -> raise (Arg.Bad ("Bad argument : " ^ x))) + ("Usage: " ^ Sys.argv.(0) ^ " [-verbose]"); + if not (was_successful (run_test_tt ~verbose:!verbose suite)) then + exit 1 +end +