-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[diem-transactional-tests] migrate reconfiguration tests
- Loading branch information
1 parent
c39a247
commit 9bcb46e
Showing
3 changed files
with
51 additions
and
54 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
diem-move/diem-framework/core/transactional-tests/reconfiguration/reconfiguration.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
processed 6 tasks | ||
|
||
task 1 'block'. lines 3-5: | ||
Events: | ||
ContractEvent { key: EventKey(11000000000000000000000000000000000000000a550c18), index: 0, type: Struct(StructTag { address: 00000000000000000000000000000001, module: Identifier("DiemBlock"), name: Identifier("NewBlockEvent"), type_params: [] }), event_data: "0000000000000000c5e34b925cf6875fec02d4b77adbd2d6000200000000000000" } | ||
|
||
task 2 'run'. lines 6-16: | ||
Error: Transaction discarded. VMStatus: status ABORTED of type Execution with sub status 2 | ||
|
||
task 4 'block'. lines 27-29: | ||
Events: | ||
ContractEvent { key: EventKey(11000000000000000000000000000000000000000a550c18), index: 1, type: Struct(StructTag { address: 00000000000000000000000000000001, module: Identifier("DiemBlock"), name: Identifier("NewBlockEvent"), type_params: [] }), event_data: "0000000000000000c5e34b925cf6875fec02d4b77adbd2d6000300000000000000" } |
39 changes: 39 additions & 0 deletions
39
diem-move/diem-framework/core/transactional-tests/reconfiguration/reconfiguration.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//# init --validators Vivian Valentina --parent-vasps Alice | ||
|
||
//# block --proposer Vivian --time 2 | ||
|
||
// Reconfiguration can only be invoked by the diem root. | ||
//# run --admin-script --signers DiemRoot Vivian | ||
script { | ||
use DiemFramework::DiemConfig; | ||
|
||
fun main(_dr: signer, vv: signer) { | ||
DiemConfig::reconfigure(&vv); | ||
} | ||
} | ||
|
||
|
||
// Reconfiguration can only be invoked by the diem root. | ||
//# run --admin-script --signers DiemRoot DiemRoot | ||
script { | ||
use DiemFramework::DiemConfig; | ||
|
||
fun main(dr: signer, _dr2: signer) { | ||
DiemConfig::reconfigure(&dr); | ||
DiemConfig::reconfigure(&dr); | ||
} | ||
} | ||
|
||
//# block --proposer Vivian --time 3 | ||
|
||
// Make sure two reconfigurations will only trigger one reconfiguration event. | ||
//# run --admin-script --signers DiemRoot DiemRoot | ||
script { | ||
use DiemFramework::DiemConfig; | ||
|
||
fun main(dr: signer, _dr2: signer) { | ||
DiemConfig::reconfigure(&dr); | ||
} | ||
} | ||
|
||
// TODO: missing events!!! |
54 changes: 0 additions & 54 deletions
54
language/move-compiler/functional-tests/tests/diem/reconfiguration/reconfiguration.move
This file was deleted.
Oops, something went wrong.