Skip to content

Commit

Permalink
added migration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dusan-maksimovic committed Jan 29, 2025
1 parent 73e9c08 commit 62bbbc2
Show file tree
Hide file tree
Showing 8 changed files with 409 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/hydro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydro"
version = "3.0.0"
version = "4.0.0"
authors = ["Jehan Tremback", "Philip Offtermatt", "Dusan Maksimovic"]
edition = "2018"

Expand Down
5 changes: 2 additions & 3 deletions contracts/hydro/src/migration/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ use cw2::{get_contract_version, set_contract_version};
use neutron_sdk::bindings::msg::NeutronMsg;
use neutron_sdk::bindings::query::NeutronQuery;

use super::unreleased::migrate_v3_0_0_to_unreleased;
use super::v3_0_0::MigrateMsgV3_0_0;
use super::unreleased::{migrate_v3_0_0_to_unreleased, MigrateMsgUnreleased};

pub const CONTRACT_VERSION_V1_1_0: &str = "1.1.0";
pub const CONTRACT_VERSION_V2_0_1: &str = "2.0.1";
Expand All @@ -21,7 +20,7 @@ pub const CONTRACT_VERSION_UNRELEASED: &str = "4.0.0";
pub fn migrate(
mut deps: DepsMut<NeutronQuery>,
env: Env,
_msg: MigrateMsgV3_0_0,
_msg: MigrateMsgUnreleased,
) -> Result<Response<NeutronMsg>, ContractError> {
let contract_version = get_contract_version(deps.storage)?;

Expand Down
3 changes: 3 additions & 0 deletions contracts/hydro/src/migration/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pub mod migrate;
pub mod unreleased;
pub mod v3_0_0;

#[cfg(test)]
mod testing_unreleased;
Loading

0 comments on commit 62bbbc2

Please sign in to comment.