-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* finish basic_loan_flow * remove deprecated tests * reorganization of the generic module * add Readme * support for external priced loans * oracle example working * refactor using calls * add maturity extension changed test * minor doc fixes * fix block by seconds issue * Support jumping to future blocks
- Loading branch information
Showing
27 changed files
with
840 additions
and
1,282 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ package policy { | |
} | ||
enum WriteOffTrigger { | ||
PrincipalOverdueDays, | ||
PrincipalOverdue, | ||
PriceOutdated, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Runtime Generic tests | ||
|
||
The aim of this module is to make integration-tests independently for all runtimes at once. | ||
|
||
You can choose the environment for each of your use cases: | ||
- `RuntimeEnv`: Simple environment that acts as a wrapper over the runtime | ||
- `FudgeEnv`: Advanced environment that use a client and connect the runtime to a relay chain. | ||
|
||
Both environment uses the same interface so jumping from one to the another should be something "smooth". | ||
|
||
## Where I start? | ||
- Create a new file in `cases/<file.rs>` for the use case you want to test. | ||
- Maybe you need to update the `Runtime` trait in `config.rs` file with extra information from your new pallet. | ||
This could imply: | ||
- Adding bounds to the `Runtime` trait with your new pallet. | ||
- Adding bounds to `T::RuntimeCallExt` to support calls from your pallet. | ||
- Adding bounds to `T::EventExt` to support events from your pallet. | ||
- Adding bounds to `T::Api` to support new api calls. | ||
- You can add `GenesisBuild` builders for setting the initial state of your pallet for others in `utils/genesis.rs`. | ||
Please be as generic and simple as possible to leave others to compose its own requirement using your method, | ||
without hidden initializations. | ||
- You can add any utility that helps to initialize states for others under `utils` folder. | ||
Again, focus in simplity but without side effects or hidden / non-obvious state changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.