aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-09-12 01:20:42 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-09-12 02:38:54 +0000
commit2d0ce6252c94cf23477478b35b39466aa120b7cc (patch)
tree420f14afde67c66b59c992891a3f9eda21bfc0c7 /test/integration
parentb79224410f469a1cd4ff3be4f8e62d71398109fc (diff)
downloadRNT-2d0ce6252c94cf23477478b35b39466aa120b7cc.tar.gz
RNT-2d0ce6252c94cf23477478b35b39466aa120b7cc.zip
Directory and registry ergonomics
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/Registration.ml39
1 files changed, 11 insertions, 28 deletions
diff --git a/test/integration/Registration.ml b/test/integration/Registration.ml
index c77a139..f9d865f 100644
--- a/test/integration/Registration.ml
+++ b/test/integration/Registration.ml
@@ -7,36 +7,19 @@ 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 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
- check bool "" true registration;
- check bool "" true presence
+ begin
+ let* root = I.initialize 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 conn in
+ Kernel.Path.(lookup' root ("branch" @/ "master" @/ "multigroup" @/ this))
+ end
+ |> Helpers.condition_as_failure |> ignore
let suite prefix =
( "registration/" ^ prefix,