Skip to content
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

test: generic extension unit testing #240

Merged
merged 37 commits into from
Sep 5, 2024

Conversation

chungquantin
Copy link
Collaborator

@chungquantin chungquantin commented Aug 28, 2024

Test suite for modules in the generic extension crate:

Screenshot 2024-08-30 at 00 07 06

@chungquantin chungquantin changed the base branch from main to frank/extension August 28, 2024 07:40
@chungquantin chungquantin changed the title test: add unit test cases for extension test: add unit test cases for generic extension Aug 28, 2024
@chungquantin chungquantin self-assigned this Aug 28, 2024
@chungquantin chungquantin marked this pull request as ready for review August 28, 2024 15:02
extension/src/mock.rs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 94.92537% with 34 lines in your changes missing coverage. Please review.

Project coverage is 45.24%. Comparing base (7a20bb7) to head (456b0cd).

Files with missing lines Patch % Lines
extension/src/functions.rs 95.96% 0 Missing and 9 partials ⚠️
pallets/api/src/extension.rs 0.00% 6 Missing ⚠️
primitives/src/lib.rs 0.00% 6 Missing ⚠️
extension/src/lib.rs 96.34% 0 Missing and 3 partials ⚠️
extension/src/mock.rs 93.75% 2 Missing and 1 partial ⚠️
node/src/command.rs 0.00% 2 Missing ⚠️
runtime/devnet/src/config/xcm.rs 0.00% 2 Missing ⚠️
runtime/testnet/src/config/xcm.rs 0.00% 2 Missing ⚠️
extension/src/decoding.rs 99.32% 1 Missing ⚠️
@@                 Coverage Diff                 @@
##           frank/extension     #240      +/-   ##
===================================================
+ Coverage            35.84%   45.24%   +9.39%     
===================================================
  Files                   40       40              
  Lines                 3270     3698     +428     
  Branches              3270     3698     +428     
===================================================
+ Hits                  1172     1673     +501     
+ Misses                2039     1971      -68     
+ Partials                59       54       -5     
Files with missing lines Coverage Δ
extension/src/matching.rs 100.00% <100.00%> (+54.54%) ⬆️
extension/src/tests.rs 97.22% <100.00%> (+5.81%) ⬆️
pallets/api/src/fungibles/mod.rs 82.96% <100.00%> (ø)
runtime/devnet/src/config/api/mod.rs 0.00% <ø> (ø)
runtime/devnet/src/config/api/versioning.rs 61.19% <100.00%> (+0.29%) ⬆️
runtime/devnet/src/config/proxy.rs 0.00% <ø> (ø)
runtime/devnet/src/lib.rs 17.31% <ø> (ø)
runtime/testnet/src/config/proxy.rs 0.00% <ø> (ø)
runtime/testnet/src/extensions.rs 0.00% <ø> (ø)
runtime/testnet/src/lib.rs 14.88% <ø> (ø)
... and 9 more

... and 1 file with indirect coverage changes

Copy link
Collaborator

@evilrobot-01 evilrobot-01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a partial review.

Looks great so far, left some comments.

extension/src/decoding.rs Outdated Show resolved Hide resolved
extension/src/decoding.rs Outdated Show resolved Hide resolved
extension/src/decoding.rs Outdated Show resolved Hide resolved
extension/src/tests/utils.rs Outdated Show resolved Hide resolved
extension/src/decoding.rs Outdated Show resolved Hide resolved
extension/src/functions.rs Outdated Show resolved Hide resolved
extension/src/functions.rs Outdated Show resolved Hide resolved
extension/src/functions.rs Outdated Show resolved Hide resolved
extension/src/functions.rs Outdated Show resolved Hide resolved
extension/src/functions.rs Outdated Show resolved Hide resolved
@chungquantin chungquantin changed the title test: add unit test cases for generic extension test: generic extension unit testing Sep 3, 2024
Copy link
Collaborator

@peterwht peterwht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!!! Really great coverage, the small test sizes made reviewing and understanding everything much easier.

Left some comments, but I can tell it's super close to being ready.

extension/src/tests/utils.rs Outdated Show resolved Hide resolved
extension/src/tests/utils.rs Outdated Show resolved Hide resolved
extension/src/tests/utils.rs Outdated Show resolved Hide resolved
extension/src/tests/utils.rs Outdated Show resolved Hide resolved
extension/src/functions.rs Outdated Show resolved Hide resolved
extension/src/matching.rs Show resolved Hide resolved
extension/src/tests/contract.rs Outdated Show resolved Hide resolved
extension/src/tests/contract.rs Outdated Show resolved Hide resolved
extension/src/tests/contract.rs Outdated Show resolved Hide resolved
extension/src/tests/mod.rs Outdated Show resolved Hide resolved
@chungquantin chungquantin merged commit 39f16e1 into frank/extension Sep 5, 2024
10 checks passed
@chungquantin chungquantin deleted the chungquantin/extension-tests branch September 5, 2024 14:36
chungquantin added a commit that referenced this pull request Sep 6, 2024
chungquantin added a commit that referenced this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants