Revision 5c0277382a82ab3642ddd1de790a362e8c047837 authored by Pierre-Louis on 11 September 2023, 13:01:33 UTC, committed by Pierre-Louis on 25 September 2023, 12:16:22 UTC
1 parent 97eebdf
increase_paid_storage.ml
(*****************************************************************************)
(* *)
(* Open Source License *)
(* Copyright (c) 2022 Nomadic Labs <contact@nomadic-labs.com> *)
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining a *)
(* copy of this software and associated documentation files (the "Software"),*)
(* to deal in the Software without restriction, including without limitation *)
(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *)
(* and/or sell copies of the Software, and to permit persons to whom the *)
(* Software is furnished to do so, subject to the following conditions: *)
(* *)
(* The above copyright notice and this permission notice shall be included *)
(* in all copies or substantial portions of the Software. *)
(* *)
(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)
(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *)
(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *)
(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)
(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *)
(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *)
(* DEALINGS IN THE SOFTWARE. *)
(* *)
(*****************************************************************************)
(* Testing
-------
Component: Increase paid storage
Invocation: dune exec tezt/tests/main.exe -- --file increase_paid_storage.ml
Subject: Tests for increasing the paid storage of a smart contract
*)
let test_increase_paid_storage =
Protocol.register_regression_test
~__FILE__
~title:"increase paid storage"
~tags:["storage"; "paid_storage"; "increase_paid_storage"]
@@ fun protocol ->
let* _, client = Client.init_with_protocol ~protocol `Client () in
let* _alias, contract =
Client.originate_contract_at
~amount:Tez.zero
~src:"bootstrap1"
~init:"Some \"initial storage\""
~burn_cap:Tez.(of_int 3)
client
["mini_scenarios"; "str_id"]
protocol
in
let* () = Client.bake_for_and_wait client in
let payer = Constant.bootstrap2.alias in
let* result =
Client.increase_paid_storage ~contract ~amount:1000 ~payer client
in
Regression.capture result ;
unit
let register ~protocols = test_increase_paid_storage protocols
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...