aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/kernel/Session.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-09-27 23:25:18 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-09-27 23:25:18 -0300
commit2752f7aeba9b6cef774783ba0a54c2025a3d692b (patch)
tree9735e678e742c06dacee6b0c98d2fe1b710c9bd4 /test/unit/kernel/Session.ml
parent43ff14bfe52d4c8b4fcbd593f6e166751a4038e5 (diff)
downloadRNT-2752f7aeba9b6cef774783ba0a54c2025a3d692b.tar.gz
RNT-2752f7aeba9b6cef774783ba0a54c2025a3d692b.zip
follow only a snapshot instead of the dead branchsession
Diffstat (limited to 'test/unit/kernel/Session.ml')
-rw-r--r--test/unit/kernel/Session.ml12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/unit/kernel/Session.ml b/test/unit/kernel/Session.ml
index 86b2fd8..2548629 100644
--- a/test/unit/kernel/Session.ml
+++ b/test/unit/kernel/Session.ml
@@ -16,7 +16,7 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
let finds root path = Rnt.Kernel.Path.lookup root path |> Result.is_ok
let pin_and_follow conn =
- let before, after, unchanged, followed, pinned, refused =
+ let before, after, unchanged, pinned, refused =
begin
let open Utilities.Result in
let open Rnt.Kernel.Path in
@@ -24,7 +24,7 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
let* branch = B.make conn in
let* _ = update root ("branch" @/ this) "master" None (Some branch) in
let* tip = address branch in
- let session = Session.make conn {Protocols.Session.branch= "master"; snapshot= tip} in
+ let session = Session.make conn {Protocols.Session.snapshot= tip} in
let* _ = update root ("session" @/ this) "client" None (Some session) in
let library = "session" @/ "client" @/ "branch" @/ "multigroup" @/ "library" @/ this in
let before = finds root library in
@@ -34,22 +34,20 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
let unchanged = finds root library in
let* tip' = address branch' in
let* interface = Protocols.Handle.require Protocols.Session.from session in
- Protocols.Session.pin interface {Protocols.Session.branch= "master"; snapshot= tip'};
+ Protocols.Session.pin interface {Protocols.Session.snapshot= tip'};
let after = finds root library in
- let followed = Protocols.Session.state interface in
let* pinned = lookup root ("session" @/ "client" @/ "branch" @/ this) |> fmap address in
let refused =
assoc session ("branch" @/ "multigroup" @/ this) "other" (Some multigroup)
|> Result.is_error
in
- Ok (before, after, unchanged, followed, Concepts.Hash.hash_equals pinned tip', refused)
+ Ok (before, after, unchanged, Concepts.Hash.hash_equals pinned tip', refused)
end
|> Helpers.condition_as_failure
in
check bool "the pinned state lacks the multigroup" false before;
check bool "advancing the branch leaves the session pinned" false unchanged;
check bool "re-pinning exposes the multigroup" true after;
- check string "the session follows its branch" "master" followed.Protocols.Session.branch;
check bool "the session reconstructs the pinned branch" true pinned;
check bool "the session refuses derivation through it" true refused
@@ -61,7 +59,7 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
let* root = I.initialize conn in
let* branch = B.make conn in
let* tip = address branch in
- let session = Session.make conn {Protocols.Session.branch= "master"; snapshot= tip} in
+ let session = Session.make conn {Protocols.Session.snapshot= tip} in
let* _ = update root ("session" @/ this) "client" None (Some session) in
let client = "session" @/ "client" @/ this in
let* _ = lookup root ("session" @/ "client" @/ "branch" @/ this) in