Skip to content

New feature: a new console command to create random test torrents#511

Merged
josecelano merged 1 commit intotorrust:developfrom
josecelano:510-add-a-new-binary-to-create-test-torrents
Feb 29, 2024
Merged

New feature: a new console command to create random test torrents#511
josecelano merged 1 commit intotorrust:developfrom
josecelano:510-add-a-new-binary-to-create-test-torrents

Conversation

@josecelano
Copy link
Copy Markdown
Member

@josecelano josecelano commented Feb 29, 2024

You can execute it with:

cargo run --bin create_test_torrent ./output/test/torrents

All fields are always the same except for the content and hashes.

{
   "announce-list": [
      [
         "https://tracker.torrust-demo.com/announce"
      ]
   ],
   "httpseeds": [
      "https://seeder.torrust-demo.com/seed"
   ],
   "info": {
      "length": 37,
      "name": "file-e1fdbe05-4d33-4748-bab0-6abd297f5230.txt",
      "path": [
         "file-e1fdbe05-4d33-4748-bab0-6abd297f5230.txt"
      ],
      "piece length": 16384,
      "pieces": "<hex>AA 2C 11 CB 66 F4 CE D8 CA AA 09 2C 40 AC EA BC 95 34 44 F8</hex>"
   },
   "nodes": [
      [
         "99.236.6.144",
         6881
      ],
      [
         "91.109.195.156",
         1996
      ]
   ]
}

Output dir must exist.

You can execute it with:

```
cargo run --bin create_test_torrent ./output/test/torrents
```

Folders must be created.
@josecelano
Copy link
Copy Markdown
Member Author

ACK c92e41c

@josecelano josecelano added Testing Checking Torrust - Developer - Torrust Improvement Experience labels Feb 29, 2024
@josecelano josecelano added this to the v3.0.0 milestone Feb 29, 2024
@josecelano josecelano self-assigned this Feb 29, 2024
@josecelano josecelano linked an issue Feb 29, 2024 that may be closed by this pull request
@josecelano josecelano merged commit 11519b4 into torrust:develop Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

- Developer - Torrust Improvement Experience Testing Checking Torrust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new binary to create test torrents

1 participant