Skip to content

Commit

Permalink
add repl test for static redeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcardon committed Oct 16, 2024
1 parent d24a375 commit 9ad7414
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pact-tests/pact-tests/static-redeploy.repl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(begin-tx)

(module m g
(defcap g ()
(enforce false "NON UPGRADABLE")
)

(defun f:decimal
(a:integer b:integer)
(ln (^ a b))
)
)

(expect "Call to m.f works" 2536.90697873651379268267191946506500244140625 (m.f 420 420))
(commit-tx)

(begin-tx)
(static-redeploy "m")
(expect-failure "M is still non-upgradeable, and you cannot acquire admin despite the redeploy" (acquire-module-admin m))
(commit-tx)

(begin-tx)
(expect "Call to m.f still works" 2536.90697873651379268267191946506500244140625 (m.f 420 420))
(commit-tx)

0 comments on commit 9ad7414

Please sign in to comment.