Skip to content

Conversation

@shashankshampi
Copy link

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

@status-im-auto
Copy link
Member

status-im-auto commented Nov 4, 2024

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ fe0778a #1 2024-11-04 06:42:21 ~4 min tests-rpc 📄log
✔️ fe0778a #1 2024-11-04 06:42:53 ~5 min macos 📦zip
✔️ fe0778a #1 2024-11-04 06:43:45 ~6 min linux 📦zip
✔️ fe0778a #1 2024-11-04 06:44:10 ~6 min android 📦aar
✔️ fe0778a #1 2024-11-04 06:44:10 ~6 min ios 📦zip
✔️ fe0778a #1 2024-11-04 06:45:44 ~8 min macos 📦zip
✖️ fe0778a #1 2024-11-04 06:48:36 ~10 min windows 📦zip
✔️ fe0778a #1 2024-11-04 07:12:31 ~34 min tests 📄log
✔️ 4dbdda9 #2 2024-11-05 07:12:09 ~4 min tests-rpc 📄log
✔️ 4dbdda9 #2 2024-11-05 07:13:03 ~5 min macos 📦zip
✔️ 4dbdda9 #2 2024-11-05 07:16:48 ~8 min macos 📦zip
✖️ 4dbdda9 #2 2024-11-05 07:19:05 ~11 min windows 📦zip
✔️ 4dbdda9 #2 2024-11-05 07:40:28 ~32 min tests 📄log
✔️ a610961 #2 2024-11-05 07:14:02 ~6 min linux 📦zip
✔️ a610961 #2 2024-11-05 07:14:03 ~6 min ios 📦zip
✔️ a610961 #2 2024-11-05 07:14:46 ~7 min android 📦aar
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 4d5d3ad #3 2024-11-05 07:16:20 ~4 min tests-rpc 📄log
✔️ 4d5d3ad #3 2024-11-05 07:18:28 ~5 min macos 📦zip
✔️ bd245be #3 2024-11-05 07:20:07 ~6 min linux 📦zip
✔️ bd245be #3 2024-11-05 07:20:25 ~6 min ios 📦zip
✔️ bd245be #4 2024-11-05 07:20:37 ~4 min tests-rpc 📄log
✔️ bd245be #3 2024-11-05 07:21:36 ~6 min android 📦aar
✔️ bd245be #4 2024-11-05 07:22:56 ~4 min macos 📦zip
✔️ bd245be #3 2024-11-05 07:24:59 ~8 min macos 📦zip
✖️ bd245be #3 2024-11-05 07:30:08 ~10 min windows 📦zip
✔️ bd245be #3 2024-11-05 08:15:30 ~34 min tests 📄log

@codecov
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.07%. Comparing base (66d612c) to head (bd245be).
Report is 29 commits behind head on cli_test_migration.

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     
Flag Coverage Δ
functional 10.75% <ø> (+<0.01%) ⬆️
unit 59.97% <ø> (+0.08%) ⬆️

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.

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):
Copy link
Contributor

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):
Copy link
Contributor

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

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, (
Copy link
Contributor

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

@igor-sirotin
Copy link
Collaborator

This work was already done in other PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants