-
Notifications
You must be signed in to change notification settings - Fork 265
test: Token gated communities #7113
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
base: develop
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (540)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7113 +/- ##
============================================
+ Coverage 36.28% 59.56% +23.27%
============================================
Files 800 815 +15
Lines 111467 113558 +2091
============================================
+ Hits 40446 67639 +27193
+ Misses 65933 39071 -26862
- Partials 5088 6848 +1760
Flags with carried forward coverage won't be shown. Click here to find out more. |
fbarbu15
left a comment
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.
LGTM, thanks!
igor-sirotin
left a comment
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.
Thanks @romanzac! 👍
Looks good to me, just a few polishing suggestions
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
49ce18a to
d1a9df7
Compare
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
tests-functional/tests/test_wakuext_community_token_permissions.py
Outdated
Show resolved
Hide resolved
| def setup_backends(self, backend_new_profile, foundry_client): | ||
| """Initialize backends for token permission tests""" | ||
| self.owner = backend_new_profile("owner") | ||
| self.member = backend_new_profile("member") |
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.
It's not good that we create both member and member_with_snt for all tests, using setup_backends.
self.member is only used in 1/3 tests. And self.member_with_snt is only used in the other 2.
This is a waste of time and also makes it more difficult to debug.
Perhaps we can define fixtures right here, and use them in specific tests? Like owner fixture, etc.
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.
Fixed at 4aa8b34
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.
Hmm, not sure if polluting conftest.py with this is a good idea, I'd rather keep these fixtures right next to the test.
But it's just my opinion, completely up to you.
4aa8b34 to
77e3174
Compare
- test_admin_token_permissions_with_valid_tokens
- cleanup and add additional logging
- test_owner_edits_visible_before_and_after_minting_owner_token
igor-sirotin
left a comment
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.
Thank you! 👏
|
I'm investigating why These tests are almost the same. And these 2 changes TOGETHER make
So, conclusion:
I'm continuing to investigate |
|
Seems that I'm figuring out how to do it now. |
|
Blocked by: #7184 |
Introduced CustomTokens field in WalletConfig to allow registration of custom tokens, mainly necessary for the functional tests. Fixes #7184

Summary
An initial batch of functional tests to cover token-gated communities.
Tests Included
Issues discovered