From b5d99d3ee2b46b1c339d011f53ab26098746c6d9 Mon Sep 17 00:00:00 2001 From: drbeefsupreme Date: Fri, 16 Jul 2021 10:47:43 -0400 Subject: [PATCH] naive: double-spawn is no-op, not crash --- pkg/arvo/tests/lib/naive.hoon | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkg/arvo/tests/lib/naive.hoon b/pkg/arvo/tests/lib/naive.hoon index df3bde048..8672919bb 100644 --- a/pkg/arvo/tests/lib/naive.hoon +++ b/pkg/arvo/tests/lib/naive.hoon @@ -1783,17 +1783,21 @@ =/ marbud-sproxy [marbud-own %set-spawn-proxy (addr %marbud-skey)] =/ lt-spawn-0 [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] =/ lt-spawn-1 [marbud-spn %spawn ~linnup-torsyx (addr %lt-key-1)] + =| =^state:naive + =^ f state (init-marbud state) + =^ f state (n state %bat q:(gen-tx 0 marbud-sproxy %marbud-key-0)) + =^ f state (n state %bat q:(gen-tx 1 lt-spawn-0 %marbud-key-0)) + =/ marbud-point (~(got by points.state) ~marbud) + =/ new-marbud marbud-point(nonce.spawn-proxy.own 1) + =/ no-op-state state(points (~(put by points.state) ~marbud new-marbud)) :: - %- expect-fail - |. - =| =^state:naive - =^ f state (init-marbud state) - =^ f state (n state %bat q:(gen-tx 0 marbud-sproxy %marbud-key-0)) - =^ f state (n state %bat q:(gen-tx 1 lt-spawn-0 %marbud-key-0)) + %+ expect-eq + !> no-op-state + :: + !> =^ f state (n state %bat q:(gen-tx 0 lt-spawn-1 %marbud-skey)) state :: -:: ++ test-marbud-l2-change-keys ^- tang =/ new-keys [%configure-keys encr auth suit |] =/ marbud-mproxy [marbud-own %set-management-proxy (addr %marbud-mkey)] @@ -2139,8 +2143,6 @@ [escape.net sponsor.net]:(~(got by points.state) ~linnup-torsyx) :: ++ test-linnup-torsyx-l2-adopt-reject ^- tang - :: TODO: at the moment the default sponsor is always ~zod, but it should probably - :: be ~marbud here =/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] =/ lt-transfer-yes-breach [lt-xfr %transfer-point (addr %lt-key-0) &] ::