Jeff Baskin 7d89f6c7ad
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
Ran black and pylint on files.
2025-06-17 16:56:04 -04:00

27 lines
970 B
Python

"""Testing the the cluster."""
from unittest import IsolatedAsyncioTestCase
from aiohttp import ClientSession
from release_tests.support.cluster import Cluster
class ClusterTC(IsolatedAsyncioTestCase):
"""Test for the MoreThanText cluster."""
async def test_create_default_cluster(self):
"""create a complete two server cluster."""
cluster = Cluster()
await cluster.start()
async with ClientSession() as session:
url = cluster.translate.baseurl
async with session.get(url) as resp:
text = await resp.text()
self.assertEqual(resp.status, 200, text)
self.assertEqual(len(cluster.servers), 2)
for server in cluster.servers:
url = server.baseurl
async with session.get(url) as resp:
text = await resp.text()
self.assertEqual(resp.status, 200, text)
await cluster.stop()