-
Notifications
You must be signed in to change notification settings - Fork 631
CO-424 some cleanups in preparation for adding new functionalities #3751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One important comment shouldn't be discarded. Also, please make sure the commit message contains the various points you've exposed in the PR's description.
Also, I've removed review requests for Ante, Denis and Pawel. No need to ping and disturb 4 persons for some minor cleanup 👍 |
d47f7c9
to
fd67505
Compare
* [CO-424] new module SetupTestEnv.hs. Exports the function setupClient :: CLIOptions -> IO (WalletClient IO, Manager) which has been in-lined in main :: IO () before. * [CO-424] Module Functions.hs has been renamed to RandomStateWalk.hs. * [CO-424] Cleanups in Main.hs : Definitions related to the random state walk move to RandomStateWalk.hs * [CO-424] Add a new CLI option --hspec-options to pass options to HSpec. This supersedes --match and --seed. Example : launch_integration_tests --hspec-options '--skip Address'
fd67505
to
64092a7
Compare
Note: There was still an integration test failing, have we looked into that:
? |
|
||
-- | Output for @Text@. | ||
printT :: Text -> IO () | ||
printT = putStrLn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarcFontaine just as a side note, there is putText
from Universum which does exactly this 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx yes putText
should be used instead... I don't know where printT
comes
from I was just moving snippets from one module to the other..much more should be done though
Description
Most of this PR consists of refactorings that don't change functionality.
The motivation for this PR is to clean up parts of the code to make it easier to add the new features.
Changes:
Main.hs
: has been reduced to a minimum to make it easy to read and modifiy.Functions that are related to the RandomStateWalk have been moved to that module.
Functions for setting up the
WalletClient
have been moved toSetupTestEnv.hs
.SetupTestEnv.hs
exports exports
setupClient :: CLIOptions -> IO (WalletClient IO, Manager)
which has been inlined in
main :: IO ()
before.setupClient
is needed to run tests and single queries from the REPL.Functions.hs
/RandomStateWalk.hs
The module
Functions.hs
has been renamed toRandomStateWalk.hs
.some weeks ago some 5 lines have been added to
Functions.hs
that do not deal with the random state walk. these have been moved toUtils.hs
With this change the module
RandomStateWalk.hs
contains all random-state-walk code and nothing else.The random-state-walk has been disabled some weeks ago is dead code (is compiled but does not run)
There is also one breaking change in the way arguments are forwarded to HSpec.
The wallet integration tests now uses
--hspec-options
to pass options to HSpec.For example:
The
--skip
option can be used to temporary skip a test set.Here is a list of all HSpec options.
This version supports all HSpec options.
Linked issue
CO-424
Type of change
Developer checklist
Testing checklist
QA Steps
Screenshots (if available)