Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed mock interface + corrected warnings #303

Merged
merged 7 commits into from
Jan 24, 2024
Merged

Conversation

Kayanski
Copy link
Contributor

@Kayanski Kayanski commented Jan 12, 2024

This PR aims at

  • Allowing any string (or impl Into) as sender for Mock
  • Allowing any string (or impl Into) as address in BankSetter
  • Exporting cworchenvvars inside cw_orch directly

Copy link

cloudflare-workers-and-pages bot commented Jan 12, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 953bb04
Status:⚡️  Build in progress...

View logs

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (9998ad5) 66.1% compared to head (4214531) 66.1%.

Additional details and impacted files
Files Coverage Δ
contracts/mock_contract/src/msg_tests.rs 94.8% <100.0%> (ø)
cw-orch-daemon/src/log.rs 61.5% <100.0%> (ø)
cw-orch/src/snapshots.rs 100.0% <100.0%> (ø)
cw-orch/src/osmosis_test_tube/core.rs 66.5% <0.0%> (ø)
packages/cw-orch-core/src/environment/mut_env.rs 0.0% <0.0%> (ø)
packages/cw-orch-mock/src/core.rs 90.5% <50.0%> (ø)

@Kayanski Kayanski added this to the 0.20 milestone Jan 12, 2024
Copy link
Contributor

@Buckram123 Buckram123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFG


/// Related to execution environents and variables
pub mod environment {
pub use cw_orch_core::env::{default_state_folder, CwOrchEnvVars};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TYSM

use cw_orch::prelude::{CwOrchInstantiate, CwOrchUpload, Mock};

#[test]
fn contract_snapshots() -> anyhow::Result<()> {
use counter_contract::CounterExecuteMsgFns;
let sender = Addr::unchecked("sender");
let chain = Mock::new(&sender);
let chain = Mock::new("sender");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that's clean!

@Kayanski Kayanski merged commit a844cad into main Jan 24, 2024
12 of 15 checks passed
@Kayanski Kayanski deleted the fix/simpler-mock-new branch January 24, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants