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_: wakuext_SavedAddress get, remove, remaining_capacity #6333

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

churik
Copy link
Member

@churik churik commented Feb 6, 2025

Fixes #6089

🔹 Changes:

  • Added tests for wakuext_SavedAddress
  • Updated Readme.md with new information for functional test setup

🚧 Note:

The step for testing adding beyond capacity is currently commented out.
Discussion on this can be found here.

🛠 Current Issue:

The method wakuext_upsertSavedAddress works regardless of the limit set by wakuext_remainingCapacityForSavedAddresses.

📌 Readme Updates:

  1. Mac Users: Added a check for sock.connect as a prerequisite.
  2. Import Issues: Created a separate section detailing common import-related errors.

✅ Ready for review. Let me know if any additional fixes are required!

@status-im-auto
Copy link
Member

status-im-auto commented Feb 6, 2025

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 65d2324 #1 2025-02-06 16:28:37 ~4 min tests-rpc 📄log
✔️ 65d2324 #1 2025-02-06 16:28:52 ~5 min linux 📦zip
✔️ 65d2324 #1 2025-02-06 16:29:01 ~5 min macos 📦zip
✔️ 65d2324 #1 2025-02-06 16:29:10 ~5 min ios 📦zip
✔️ 65d2324 #1 2025-02-06 16:29:11 ~5 min macos 📦zip
✔️ 65d2324 #1 2025-02-06 16:29:21 ~5 min windows 📦zip
✔️ 65d2324 #1 2025-02-06 16:30:10 ~6 min android 📦aar
✔️ 65d2324 #1 2025-02-06 16:54:31 ~30 min tests 📄log
✔️ 06e00a6 #2 2025-02-10 15:27:49 ~3 min windows 📦zip
✔️ 06e00a6 #2 2025-02-10 15:28:20 ~4 min macos 📦zip
✔️ 06e00a6 #2 2025-02-10 15:29:22 ~5 min android 📦aar
✔️ 06e00a6 #2 2025-02-10 15:29:31 ~5 min tests-rpc 📄log
✔️ 06e00a6 #2 2025-02-10 15:29:32 ~5 min macos 📦zip
✔️ 06e00a6 #2 2025-02-10 15:29:32 ~5 min linux 📦zip
✔️ 06e00a6 #2 2025-02-10 15:54:38 ~30 min tests 📄log
✔️ 06e00a6 #2 2025-02-10 18:53:35 ~3 hr 29 min ios 📦zip

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.33%. Comparing base (848b411) to head (06e00a6).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6333      +/-   ##
===========================================
- Coverage    60.42%   60.33%   -0.09%     
===========================================
  Files          845      845              
  Lines       111357   111357              
===========================================
- Hits         67289    67190      -99     
- Misses       36270    36346      +76     
- Partials      7798     7821      +23     
Flag Coverage Δ
functional 0.45% <ø> (ø)
unit 60.35% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 29 files with indirect coverage changes

Copy link
Contributor

@fbarbu15 fbarbu15 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!
Added 2 small comments

),
],
)
def test_add_saved_address(self, method, params):
Copy link
Contributor

Choose a reason for hiding this comment

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

A general question for all methods:
Do we want to have tests that attempt to save an address with a wrong payload to check error handling? Or we are good with the positive scenarios only

Copy link
Member Author

Choose a reason for hiding this comment

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

I can do this, np, just when I tested validation I realized that it exists only for address from the all fields, so I was wondering does it even make sense to add error validation only for this case.
Turned out that most of validation is happening on the client

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm not sure, @igor-sirotin WDYT? Should we do functional testing for negative scenarios as well to test error handling? i.e. to send RPC requests with wrong payload

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's discuss it on the call, I'm also curious

@churik churik changed the title wakuext_SavedAddress: get, remove, remaining_capacity test_: wakuext_SavedAddress get, remove, remaining_capacity Feb 10, 2025
@churik churik requested a review from yevh-berdnyk February 10, 2025 15:36
@churik churik merged commit c099460 into develop Feb 11, 2025
19 checks passed
@churik churik deleted the test-functional-wallet branch February 11, 2025 11:36
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.

Tests: wakuext saved addressed
4 participants