Added the ability to change addresses.
This commit is contained in:
@ -4,6 +4,7 @@ import aiohttp
|
||||
|
||||
from asyncio import create_subprocess_exec
|
||||
from pathlib import Path
|
||||
from socket import gethostbyname, gethostname
|
||||
from unittest import IsolatedAsyncioTestCase
|
||||
|
||||
|
||||
@ -55,3 +56,11 @@ class SingleBootTC(IsolatedAsyncioTestCase):
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(f"http://localhost:{port}") as response:
|
||||
self.assertEqual(response.status, 200)
|
||||
|
||||
async def test_alt_address_boot(self):
|
||||
"""Can it boot off an alternate address?"""
|
||||
addr = gethostbyname(gethostname())
|
||||
await self.servers.create_server("-a", addr)
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(f"http://{addr}:3000") as response:
|
||||
self.assertEqual(response.status, 200)
|
||||
|
Reference in New Issue
Block a user