Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""Synthetic files test no-launch planning; never execute a server or client."""
|
||||
import json
|
||||
import re
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import tempfile
|
||||
@@ -10,6 +11,17 @@ import dedicated_preflight as tool
|
||||
|
||||
|
||||
class DedicatedPreflightTests(unittest.TestCase):
|
||||
def test_shipped_scenario_is_shared_by_diagnostics_and_public_launch(self):
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
manifest = tool.addon_manifest(root)
|
||||
headers = [name for name in manifest if name.endswith('.conf')
|
||||
and re.match(r'\s*SCR_MissionHeader\b', (root/name).read_text())]
|
||||
self.assertEqual(headers, ['addons/core/Missions/ERR_Everon.conf'])
|
||||
expected = '{C1E20667DCE324ED}Missions/ERR_Everon.conf'
|
||||
for project in tool.HEADERS:
|
||||
self.assertEqual(tool.selected_scenario(root, project)['header'], expected)
|
||||
self.assertNotIn('addons/core/Missions/ERR_Everon_Base.conf.meta', manifest)
|
||||
|
||||
def setUp(self):
|
||||
self.tmp = tempfile.TemporaryDirectory()
|
||||
self.addCleanup(self.tmp.cleanup)
|
||||
@@ -22,7 +34,7 @@ class DedicatedPreflightTests(unittest.TestCase):
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
(addon/'addon.gproj').write_text('GameProject { GUID "2528466DE220D91C" }')
|
||||
path.write_text('SCR_MissionHeader { World "'+tool.WORLD+'" SystemsConfig "'+tool.SYSTEMS+'" }')
|
||||
path.with_suffix('.conf.meta').write_text('MetaFileClass { Name "{AD62322D5213C440}'+header+'" }')
|
||||
path.with_suffix('.conf.meta').write_text('MetaFileClass { Name "{C1E20667DCE324ED}'+header+'" }')
|
||||
(self.runtime/'runtime-origin.json').write_text(json.dumps({'app_id':1874900,'purpose':'private anonymous Reforger dedicated server preparation; no server launched'}))
|
||||
|
||||
def plan(self, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user