Skip to content

Commit 0403601

Browse files
committed
Add upgrade e2e test and fix PackageUpgradedEvent parsing
Adds an end-to-end test that exercises the full governance-gated upgrade lifecycle and verifies cascading effects across the stack. The test found a real bug: PackageUpgradedEvent was missing from HashiEvent::try_parse(), so validators never learned about package upgrades via the event stream. Fixed by adding the missing match arm. Test flow: - Deposit before upgrade, verify balance survives (state continuity) - Upgrade via propose/vote/execute+publish+finalize - Verify all node watchers pick up the new package version - Deposit after upgrade through full validator confirmation path - Call v2-only canary module (new code reachable) - Disable v1, verify entry points rejected
1 parent a6edbfd commit 0403601

File tree

4 files changed

+783
-0
lines changed

4 files changed

+783
-0
lines changed

crates/e2e-tests/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pub mod e2e_flow;
2323
pub mod hashi_network;
2424
mod publish;
2525
pub mod sui_network;
26+
pub mod upgrade_flow;
27+
pub mod upgrade_tests;
2628

2729
pub use bitcoin_node::BitcoinNodeBuilder;
2830
pub use bitcoin_node::BitcoinNodeHandle;
@@ -69,6 +71,10 @@ impl TestNetworks {
6971
&self.bitcoin_node
7072
}
7173

74+
pub fn dir(&self) -> &Path {
75+
self.dir.path()
76+
}
77+
7278
pub async fn restart(&mut self) -> Result<()> {
7379
self.hashi_network.restart().await
7480
}

0 commit comments

Comments
 (0)