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

add test for Receive Extension Handshake stage #26

Merged
merged 1 commit into from
Sep 10, 2024
Merged

add test for Receive Extension Handshake stage #26

merged 1 commit into from
Sep 10, 2024

Conversation

sarp
Copy link
Collaborator

@sarp sarp commented Aug 21, 2024

This PR is part of magnet links extension
It adds tests for receive extension handshake stage
Tester will validate that extension handshake was received by expecting correct "Peer Metadata Extension ID: xxx" in the output

Stages

  1. Parse magnet link
  2. Advertise extension support
  3. Send extension handshake
  4. Receive extension handshake <--- this PR
  5. Request metadata
  6. Receive metadata
  7. Download a piece
  8. Download the whole file

@sarp sarp changed the title Sarp/magnet4 add test for Receive Extension Handshake Aug 21, 2024
@@ -34,12 +33,6 @@ func testMagnetSendExtendedHandshake(stageHarness *test_case_harness.TestCaseHar
if err = assertExitCode(result, 0); err != nil {
return err
}

expected := fmt.Sprintf("Peer Metadata Extension ID: %d\n", params.MyMetadataExtensionID)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

forgot to commit this in previous PR, we don't expect any output in this stage

@sarp sarp requested a review from rohitpaulk September 9, 2024 13:32
@sarp sarp marked this pull request as ready for review September 9, 2024 13:32
@sarp sarp changed the title add test for Receive Extension Handshake add test for Receive Extension Handshake stage Sep 10, 2024
@sarp sarp merged commit 5fc3010 into main Sep 10, 2024
1 check passed
@sarp sarp deleted the sarp/magnet4 branch September 11, 2024 18:39
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.

2 participants