feat: add Zenith strategy and move latency tracing
Build and Push Docker Container / build-and-push (push) Successful in 2m18s
Build and Push Docker Container / build-and-push (push) Successful in 2m18s
- Register Zenith 1.1 with balanced duel verdicts and forced-outcome overrides. - Prioritize permanent-trail space in Constrictor and health-aware hazard routes. - Deduct executor queue delays and return fallback directions on move timeouts. - Correlate response headers, replay timings, and sampled structured trace logs. - Move shared metrics publication off the response path without losing local counts. - Allow configurable tournament opponents and add a psql helper recipe. - Preserve empty latency values through compact replay encoding and migration. - Update Arena game links and use default assets for missing customizations. - Cover strategy, HTTP lifecycle, tracing, replay codecs, and dashboard behavior. - Validate with 260 passing Python tests, 4 skips, and 2 passing JavaScript tests.
This commit is contained in:
@@ -16,6 +16,22 @@ class TestDashboardStaticAssets(unittest.IsolatedAsyncioTestCase):
|
||||
gameplay_db_enabled=False,
|
||||
)
|
||||
|
||||
async def test_dashboard_uses_arena_game_url(self):
|
||||
from unittest.mock import patch
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
response = await self.server.app.test_client().get('/dashboard')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
html = await response.get_data(as_text=True)
|
||||
self.assertIn('https://arena.battlesnake.com/games', html)
|
||||
self.assertNotIn('https://play.battlesnake.com/game', html)
|
||||
|
||||
def test_gameboard_uses_arena_game_url(self):
|
||||
from types import SimpleNamespace
|
||||
from server.GameBoard import GameBoard
|
||||
game = SimpleNamespace(id='example-game')
|
||||
self.assertEqual(GameBoard._get_game_url(game, False), 'https://arena.battlesnake.com/games/example-game')
|
||||
self.assertIsNone(GameBoard._get_game_url(game, True))
|
||||
|
||||
def _static_url(self):
|
||||
return self.server.app.jinja_env.globals['static_url']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user