Added the ability to change addresses.

This commit is contained in:
2024-02-29 18:46:01 -05:00
parent 6b68a0d186
commit ec3f033ff6
2 changed files with 16 additions and 2 deletions

View File

@ -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)