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
Use memory chunk store for unit tests #871
Changes from all commits
File filter...
Jump to…
Make downloading tests work on memory store to ensure the sore is empty.
Corrected webseed test to follow fixtures and tracker magnet.
- Loading branch information
| @@ -1,6 +1,7 @@ | ||
| var extend = require('xtend') | ||
| var fixtures = require('webtorrent-fixtures') | ||
| var fs = require('fs') | ||
| var MemoryChunkStore = require('memory-chunk-store') | ||
| var series = require('run-series') | ||
| var test = require('tape') | ||
| var TrackerServer = require('bittorrent-tracker/server') | ||
| @@ -15,7 +16,7 @@ test('Download using HTTP tracker (via magnet uri)', function (t) { | ||
| }) | ||
|
|
||
| function magnetDownloadTest (t, serverType) { | ||
| t.plan(10) | ||
| t.plan(11) | ||
feross
Member
|
||
|
|
||
| var tracker = new TrackerServer( | ||
| serverType === 'udp' ? { http: false, ws: false } : { udp: false, ws: false } | ||
| @@ -70,7 +71,7 @@ function magnetDownloadTest (t, serverType) { | ||
| }) | ||
| }) | ||
|
|
||
| client1.add(parsedTorrent) | ||
| client1.add(parsedTorrent, {store: MemoryChunkStore}) | ||
| }, | ||
|
|
||
| function (cb) { | ||
| @@ -102,7 +103,7 @@ function magnetDownloadTest (t, serverType) { | ||
| } | ||
| }) | ||
|
|
||
| client2.add(magnetURI) | ||
| client2.add(magnetURI, {store: MemoryChunkStore}) | ||
| } | ||
|
|
||
| ], function (err) { | ||
This test was not passing with an empty store, I assume this is the good number.