Added initial cluster setup.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s

This commit is contained in:
2025-06-17 16:50:54 -04:00
parent 2066084c13
commit f73d091dc2
5 changed files with 70 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
"""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()