-
-
Notifications
You must be signed in to change notification settings - Fork 115
feat: Introduce cross-core testing along with improvements to test frameworking #7524
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
Merged
+202
−21
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b78c82f
add instructions how to activate for development
hpk42 134b1fa
add cross-core tests
hpk42 66d70d8
show which deltachat-rpc-server is used when pytestplugin from deltac…
hpk42 8a9d56b
merge test_rpc_virtual into new cross-core testing file
hpk42 de1cf2f
make cross-core tests work on windows
hpk42 2925fad
Update deltachat-rpc-client/README.md
hpk42 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import subprocess | ||
|
|
||
| import pytest | ||
|
|
||
| from deltachat_rpc_client import DeltaChat, Rpc | ||
|
|
||
|
|
||
| def test_install_venv_and_use_other_core(tmp_path, get_core_python_env): | ||
| python, rpc_server_path = get_core_python_env("2.24.0") | ||
| subprocess.check_call([python, "-m", "pip", "install", "deltachat-rpc-server==2.24.0"]) | ||
| rpc = Rpc(accounts_dir=tmp_path.joinpath("accounts"), rpc_server_path=rpc_server_path) | ||
|
|
||
| with rpc: | ||
| dc = DeltaChat(rpc) | ||
| assert dc.rpc.get_system_info()["deltachat_core_version"] == "v2.24.0" | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("version", ["2.24.0"]) | ||
iequidoo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| def test_qr_setup_contact(alice_and_remote_bob, version) -> None: | ||
| """Test other-core Bob profile can do securejoin with Alice on current core.""" | ||
| alice, alice_contact_bob, remote_eval = alice_and_remote_bob(version) | ||
|
|
||
| qr_code = alice.get_qr_code() | ||
| remote_eval(f"bob.secure_join({qr_code!r})") | ||
| alice.wait_for_securejoin_inviter_success() | ||
|
|
||
| # Test that Alice verified Bob's profile. | ||
| alice_contact_bob_snapshot = alice_contact_bob.get_snapshot() | ||
| assert alice_contact_bob_snapshot.is_verified | ||
|
|
||
| remote_eval("bob.wait_for_securejoin_joiner_success()") | ||
|
|
||
| # Test that Bob verified Alice's profile. | ||
| assert remote_eval("bob_contact_alice.get_snapshot().is_verified") | ||
|
|
||
|
|
||
| def test_send_and_receive_message(alice_and_remote_bob) -> None: | ||
| """Test other-core Bob profile can send a message to Alice on current core.""" | ||
| alice, alice_contact_bob, remote_eval = alice_and_remote_bob("2.20.0") | ||
|
|
||
| remote_eval("bob_contact_alice.create_chat().send_text('hello')") | ||
|
|
||
| msg = alice.wait_for_incoming_msg() | ||
| assert msg.get_snapshot().text == "hello" | ||
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.