Skip to content

Commit 2b4352e

Browse files
committed
Fixed failed tests
Signed-off-by: artem.ivanov <[email protected]>
1 parent 331f84d commit 2b4352e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libindy/src/services/wallet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl WalletCredentials {
7777
PwhashArgon2i13::derive_key(&mut master_key, key.as_bytes(), salt)?;
7878
master_key
7979
} else {
80-
return Err(WalletError::CommonError(CommonError::InvalidStructure(String::from("Credentials missing 'key' field"))));
80+
return Err(WalletError::InputError(String::from("Credentials missing 'key' field")));
8181
};
8282

8383
let rekey = if let Some(key) = m.get("rekey").and_then(|s| s.as_str()) {

libindy/tests/wallet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ mod medium_cases {
361361
TestUtils::cleanup_storage();
362362

363363
let res = WalletUtils::create_wallet(POOL, WALLET, None, None, Some(r#"{}"#));
364-
assert_eq!(res.unwrap_err(), ErrorCode::CommonInvalidStructure);
364+
assert_eq!(res.unwrap_err(), ErrorCode::WalletInputError);
365365

366366
TestUtils::cleanup_storage();
367367
}

wrappers/python/tests/wallet/test_open_wallet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ async def test_open_wallet_works_for_twice(wallet_name, wallet_handle, credentia
2727

2828

2929
@pytest.mark.asyncio
30-
async def test_open_wallet_works_for_empty_credentials(xwallet, wallet_name):
30+
async def test_open_wallet_works_for_missed_key(xwallet, wallet_name):
3131
with pytest.raises(IndyError) as e:
3232
await wallet.open_wallet(wallet_name, None, "{}")
33-
assert ErrorCode.CommonInvalidStructure == e.value.error_code
33+
assert ErrorCode.WalletInputError == e.value.error_code
3434

3535

3636
@pytest.mark.asyncio

0 commit comments

Comments
 (0)