Skip to content

Commit

Permalink
use a non-default port for streaming test so it can run with a live i…
Browse files Browse the repository at this point in the history
…nstance
  • Loading branch information
shyba committed Oct 28, 2022
1 parent e7e7ad7 commit 02f5444
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/integration/datanetwork/test_file_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class FileCommands(CommandTestCase):
def __init__(self, *a, **kw):
super().__init__(*a, **kw)
self.skip_libtorrent = False
self.streaming_port = 60818

async def add_forever(self):
while True:
Expand Down Expand Up @@ -56,11 +57,11 @@ async def initialize_torrent(self, tx_to_update=None):
return tx, btih

async def assert_torrent_streaming_works(self, btih):
url = f'http://{self.daemon.conf.streaming_host}:{self.daemon.conf.streaming_port}/get/torrent'
url = f'http://{self.daemon.conf.streaming_host}:{self.streaming_port}/get/torrent'
if self.daemon.streaming_runner.server is None:
await self.daemon.streaming_runner.setup()
site = aiohttp.web.TCPSite(self.daemon.streaming_runner, self.daemon.conf.streaming_host,
self.daemon.conf.streaming_port)
self.streaming_port)
await site.start()
async with aiohttp_request('get', url) as req:
self.assertEqual(req.headers.get('Content-Type'), 'application/octet-stream')
Expand Down

0 comments on commit 02f5444

Please sign in to comment.