aboutsummaryrefslogtreecommitdiff
path: root/tests/importConf_test.ml
blob: c94eb9132a5d454741c42ffa9df47fb91c66d285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
open OUnit2
open ConfLoader

(** Test the dependencies extracted from the external named "source".

    Refer to the default configuration used in [ConfLoader] to see the
    configuration.
 *)
let test_get_dependencies_for_source =
  "get_dependancies_for_table" >:: fun _ ->
  let result = ImportConf.get_dependancies_for_table conf conf.source
  and expected = [ external_other ] in
  assert_equal ~printer:pp_externals expected result

let test_get_dependencies_for_other =
  "get_dependancies_for_table" >:: fun _ ->
  let result = ImportConf.get_dependancies_for_table conf external_table_other
  and expected = [ external_last ] in
  assert_equal ~printer:pp_externals expected result

let tests =
  "importConf_test"
  >::: [ test_get_dependencies_for_source; test_get_dependencies_for_other ]