Skip to content

Commit e49fc0e

Browse files
committed
Fix integration tests
1 parent 4c9d104 commit e49fc0e

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

contracts/burner/tests/integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn instantiate_fails() {
3535
let msg = res.unwrap_err();
3636
assert_eq!(
3737
msg,
38-
"Generic error: You can only use this contract for migrations"
38+
"kind: Other, error: You can only use this contract for migrations"
3939
);
4040
}
4141

contracts/crypto-verify/tests/integration.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ fn cosmos_signature_verify_errors() {
221221
let res = query(&mut deps, mock_env(), verify_msg);
222222
assert_eq!(
223223
res.unwrap_err(),
224-
"Verification error: Invalid public key format"
224+
"kind: Cryptography, error: Invalid public key format"
225225
)
226226
}
227227

@@ -283,7 +283,7 @@ fn secp256r1_signature_verify_errors() {
283283
let res = query(&mut deps, mock_env(), verify_msg);
284284
assert_eq!(
285285
res.unwrap_err(),
286-
"Verification error: Invalid public key format"
286+
"kind: Cryptography, error: Invalid public key format"
287287
)
288288
}
289289

@@ -354,7 +354,7 @@ fn ethereum_signature_verify_fails_for_corrupted_signature() {
354354
};
355355
let result = query(&mut deps, mock_env(), verify_msg);
356356
let msg = result.unwrap_err();
357-
assert_eq!(msg, "Recover pubkey error: Unknown error: 10");
357+
assert_eq!(msg, "kind: Cryptography, error: Unknown error: 10");
358358
}
359359

360360
#[test]
@@ -466,7 +466,7 @@ fn tendermint_signature_verify_errors() {
466466
let res = query(&mut deps, mock_env(), verify_msg);
467467
assert_eq!(
468468
res.unwrap_err(),
469-
"Verification error: Invalid public key format"
469+
"kind: Cryptography, error: Invalid public key format"
470470
)
471471
}
472472

@@ -625,7 +625,7 @@ fn tendermint_signatures_batch_verify_errors() {
625625
let res = query(&mut deps, mock_env(), verify_msg);
626626
assert_eq!(
627627
res.unwrap_err(),
628-
"Verification error: Invalid public key format"
628+
"kind: Cryptography, error: Invalid public key format"
629629
)
630630
}
631631

contracts/hackatom/tests/integration.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn instantiate_and_query() {
9797
// bad query returns parse error (pass wrong type - this connection is not enforced)
9898
let qres = query(&mut deps, mock_env(), ExecuteMsg::Panic {});
9999
let msg = qres.unwrap_err();
100-
assert!(msg.contains("Error parsing"));
100+
assert!(msg.contains("kind: Serialization"), "{msg}");
101101
}
102102

103103
#[test]
@@ -178,7 +178,7 @@ fn fails_on_bad_init() {
178178
let res: ContractResult<Response> =
179179
instantiate(&mut deps, mock_env(), info, ExecuteMsg::Panic {});
180180
let msg = res.unwrap_err();
181-
assert!(msg.contains("Error parsing"));
181+
assert!(msg.contains("kind: Serialization"), "{msg}");
182182
}
183183

184184
#[test]
@@ -407,7 +407,10 @@ fn execute_allocate_large_memory() {
407407
execute_info,
408408
ExecuteMsg::AllocateLargeMemory { pages: 1600 },
409409
);
410-
assert_eq!(result.unwrap_err(), "Generic error: memory.grow failed");
410+
assert_eq!(
411+
result.unwrap_err(),
412+
"kind: Other, error: memory.grow failed"
413+
);
411414
let gas_used = gas_before - deps.get_gas_left();
412415
// Gas consumption is relatively small
413416
// Note: the exact gas usage depends on the Rust version used to compile Wasm,

contracts/nested-contracts/inner-contract/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/staking/tests/integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn initialization_with_missing_validator() {
5252
let msg = res.unwrap_err();
5353
assert_eq!(
5454
msg,
55-
"Generic error: my-validator is not in the current validator set"
55+
"kind: Other, error: my-validator is not in the current validator set"
5656
);
5757
}
5858

0 commit comments

Comments
 (0)