-
Notifications
You must be signed in to change notification settings - Fork 246
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_: Code Migration from status-cli-tests with create private groups #6028
base: cli_test_migration
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (16)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## cli_test_migration #6028 +/- ##
======================================================
+ Coverage 59.99% 60.07% +0.08%
======================================================
Files 812 812
Lines 109328 109328
======================================================
+ Hits 65589 65683 +94
+ Misses 36015 35961 -54
+ Partials 7724 7684 -40
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Left some comments
Also let's not merge this one to the main branch until we sort the main PR
Thanks
self.first_node.stop() | ||
self.second_node.stop() | ||
|
||
def send_and_wait_for_message(self, nodes, display_name, index, timeout=10): |
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.
in this case we should just assume that contact_request works fine and the validation should focus on private_group functionality
|
||
return timestamp, message_id, contact_request_message, response | ||
|
||
def create_and_validate_private_group(self, node, members_pubkeys, group_name, timeout=10): |
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.
we should extract those functions in some common place/helper so we don't duplicate it
@@ -32,8 +32,8 @@ def validate_chat_data(self, expected_chat_id, expected_display_name, expected_t | |||
) | |||
|
|||
actual_contact_request_state = last_message.get("contactRequestState") | |||
assert actual_contact_request_state == 1, ( | |||
f"Unexpected contact request state: Expected '1', found '{actual_contact_request_state}'" | |||
assert actual_contact_request_state >= 1, ( |
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.
maybe we should add a new param and in some places to keep the assertion as exact and other places where we don't care that much to keep it as loose
changes:
Added Test to create a private group
Migrated contract request test from the old repository https://github.com/status-im/status-cli-tests
Added response validation
Helper and methods to support migration