diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-09-17 01:52:58 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-09-17 01:52:58 +0000 |
| commit | 4a172f7bc032d9d0e16fa446f1f5e19cc4feb0fe (patch) | |
| tree | e2c1bd4b467ee0bc383067ea700ca8333f4989fa /test/integration/Registration.ml | |
| parent | 9af4d05d98ce64c30a65a21131a2ff4037d7651a (diff) | |
| parent | 2ec420d1542ea64978bdd4666a51ec4959f648b7 (diff) | |
| download | RNT-4a172f7bc032d9d0e16fa446f1f5e19cc4feb0fe.tar.gz RNT-4a172f7bc032d9d0e16fa446f1f5e19cc4feb0fe.zip | |
Merge branch 'master' into evaluator
Diffstat (limited to 'test/integration/Registration.ml')
| -rw-r--r-- | test/integration/Registration.ml | 48 |
1 files changed, 13 insertions, 35 deletions
diff --git a/test/integration/Registration.ml b/test/integration/Registration.ml index 991bafa..9eb3e4e 100644 --- a/test/integration/Registration.ml +++ b/test/integration/Registration.ml @@ -7,43 +7,21 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) = module I = Kernel.Initialization.Make (S) module B = Kernel.Branch.Make (S) - module Error = struct - open Concepts.Condition - - let not_found () = condition "not-found" "An expected object was not present" empty - end - let run conn = let open Utilities.Result in - let open Protocols in - let registration = - begin - let* root = I.initialize ~evaluators:["fol", Evaluators.FOL.make ()] conn in - let* bm = Kernel.Path.(lookup root ("branch" @/ this)) - |> fmap (Option.to_result ~none:(Error.not_found ())) in - let* bm = Registry.from bm |> Option.to_result ~none:(Error.not_found ()) in - let* branch = B.make conn in - Registry.update bm "master" None (Some branch) - end - |> Helpers.condition_as_failure in - let presence = - begin - let* root = I.initialize conn in - let* bm = Kernel.Path.(lookup root ("branch" @/ this)) - |> fmap (Option.to_result ~none:(Error.not_found ())) in - let* bm = Directory.from bm |> Option.to_result ~none:(Error.not_found ()) in - Directory.find bm "master" |> Result.map Option.is_some - end - |> Helpers.condition_as_failure in - let evaluator = - begin - let* root = I.initialize ~evaluators:["fol", Evaluators.FOL.make ()] conn in - Kernel.Path.(lookup root ("evaluator" @/ "fol" @/ this)) |> Result.map Option.is_some - end - |> Helpers.condition_as_failure in - check bool "" true registration; - check bool "" true presence; - check bool "the fol evaluator is registered" true evaluator + begin + let* root = I.initialize ~evaluators:["fol", Evaluators.FOL.make ()] conn in + let* branch = B.make conn in + Kernel.Path.(update root ("branch" @/ this) "master" None (Some branch)) + end + |> Helpers.condition_as_failure |> ignore; + begin + let* root = I.initialize ~evaluators:["fol", Evaluators.FOL.make ()] conn in + let* _ = Kernel.Path.(lookup root ("branch" @/ "master" @/ "multigroup" @/ this)) in + let* _ = Kernel.Path.(lookup root ("evaluator" @/ "fol" @/ this)) in + Ok () + end + |> Helpers.condition_as_failure let suite prefix = ( "registration/" ^ prefix, |
