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

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

Conversation

josecelano
Copy link
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
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
11 of 13 checks passed
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