Skip to content

Commit 419d5bd

Browse files
committed
[tests] testing force upgrade of libra-framework (#201)
1 parent b9465f5 commit 419d5bd

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

framework/releases/head.mrb

-12 Bytes
Binary file not shown.

framework/src/upgrade_fixtures/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ pub fn upgrade_fixtures() -> anyhow::Result<()> {
117117
let modules = vec!["move-stdlib".to_string()];
118118
generate_fixtures(p, modules, false)?;
119119

120+
// for single step arbitrary/forced upgrades
121+
// places the all_your_base in the move-stdlib dir
122+
let p = fixture_path.join("upgrade-single-lib-force");
123+
std::fs::create_dir_all(&p)?;
124+
let modules = vec!["libra-framework".to_string()];
125+
generate_fixtures(p, modules, true)?;
126+
120127
// for multi step upgrades
121128
// places the all_your_base in the libra_framework dir
122129
let p = fixture_path.join("upgrade-multi-lib");
@@ -126,7 +133,6 @@ pub fn upgrade_fixtures() -> anyhow::Result<()> {
126133
"vendor-stdlib".to_string(),
127134
"libra-framework".to_string(),
128135
];
129-
130136
generate_fixtures(p, modules, false)?;
131137

132138
// generate fixtures with arbitrary release
@@ -137,7 +143,6 @@ pub fn upgrade_fixtures() -> anyhow::Result<()> {
137143
"vendor-stdlib".to_string(),
138144
"libra-framework".to_string(),
139145
];
140-
141146
generate_fixtures(p, modules, true)?;
142147

143148
Ok(())

tools/txs/tests/upgrade_compatible_from_mainnet.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,24 @@ async fn smoke_upgrade_mainnet_compatible_multiple() {
2929
.await;
3030
}
3131

32-
/// do the same as above, but use the "arbitrary" upgrade policy to force an
33-
/// upgrade.
32+
/////// TEST ARBITRARY UPGRADES ///////
33+
// do the same as above, but use the "arbitrary" upgrade policy to force an
34+
// upgrade.
35+
//
36+
/// Force upgrade Libra
3437
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
35-
async fn smoke_upgrade_mainnet_compatible_multiple_force() {
38+
async fn smoke_upgrade_mainnet_force_libra() {
39+
support::upgrade_multiple_impl(
40+
"upgrade-single-lib-force",
41+
vec!["1-libra-framework"],
42+
ReleaseTarget::Mainnet,
43+
)
44+
.await;
45+
}
46+
47+
/// Upgrade all modules
48+
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
49+
async fn smoke_upgrade_mainnet_force_multiple() {
3650
support::upgrade_multiple_impl(
3751
"upgrade-multi-lib-force",
3852
vec!["1-move-stdlib", "2-vendor-stdlib", "3-libra-framework"],

0 commit comments

Comments
 (0)