-
Notifications
You must be signed in to change notification settings - Fork 83
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
Remove dependencies on global settings #169
Conversation
Let's not try to merge this before release though. |
a02964a
to
37cae1b
Compare
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
37cae1b
to
b8f224d
Compare
Codecov Report
@@ Coverage Diff @@
## master #169 +/- ##
==========================================
+ Coverage 51.06% 51.10% +0.04%
==========================================
Files 150 151 +1
Lines 22957 22923 -34
Branches 6059 6053 -6
==========================================
- Hits 11722 11714 -8
+ Misses 7628 7603 -25
+ Partials 3607 3606 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
This PR is refactoring a few things. It started with attempt to extract open_pool, init_core, open_wallet logic from
api/
so that that these function would be located with other internal apis insrc/*.rs
. Having this done will enable start working on agent abstractions similar like what we have inagents/node/vcxagent-core
Many of wallet and pool tests started failing and it was difficult to figure out why as the logic in tests and
utils/libindy/wallet
was intertwined with reliance on global state in settings. Also when one test failed, it often caused domino effect as all wallet tests were using same wallet name. So I went down the rabbit hole and refactored the code a bit:utils/libindy
and in tests. Instead, I made function interfaces more explicit. Where the function would previously read some data from global state (for example key derivation method), now it have to passed as argumentRAW
KDF ( i believe some previously were not), so testing might be somewhat fasterAgencyModeSetup
for connection state machine tests - it was creating wallet but then mocking all calls into it - instead simpleSetupIndyMocks
works just fine for those tests.SetupAriesMocks
,SetupStrictAriesMocks
could now also be replaced bySetupIndyMocks
SetupLibraryAgencyV1, SetupLibraryAgencyV1ZeroFees, SetupLibraryAgencyZeroFees
were unused -> deletedSetupWalletAndPool
was deleted - test which needs to mock wallet and pool (test_init_with_file
,test_init_with_config
,test_vcx_init_with_default_values
,test_vcx_init_called_twice_fails
) useSetupWallet
SetupPoolConfig
to achieve the same result.Signed-off-by: Patrik Stas patrik.stas@absa.africa