summaryrefslogtreecommitdiff
path: root/src/__tests__/VyOSElasticModernHostTestCase.php
AgeCommit message (Collapse)Author
2026-05-23Engine: revert abstract → plain class for production dispatchYuriy Andamasov
A recent fixup cascade declared VyOSElasticModernFulltextStorageEngine as 'abstract class' to enable test-doubling subclasses (VyOSElasticModernHostTestEngine, VyOSElasticModernFulltextStorageEngineTestDouble). That change broke production dispatch: Phorge's PhutilClassMapQuery selects engines via PhutilSymbolLoader::loadObjects(), which calls setConcreteOnly(true) and unsets any class where reflection reports isAbstract(). The engine class would no longer be discoverable by cluster.search[].type:elasticsearch-modern, and the test-fixture subclasses live in src/__tests__/ which libphutil excludes from runtime class-map loading. Revert to plain 'class' (not 'final', not 'abstract'). Plain 'class' is discoverable by PhutilClassMapQuery; existing test fixtures keep working without rewrite; operators can subclass if they need to (harmless). Also update VyOSElasticModernHostTestCase::testPlaceholderEngineIsAbstract → testEngineIsConcreteForDispatch, inverting the assertion to document the correct invariant and its rationale (setConcreteOnly reference). All 22 tests pass. 🤖 Generated by [robots](https://vyos.io)
2026-05-22H1: keep placeholder engine undiscoverablecopilot-swe-agent[bot]
2026-05-22H1: Apply code-quality fixes from reviewYuriy Andamasov
- Engine class marked final (matches host class declaration; no design intent to subclass). - testConfigOverrides now also asserts host and port (these were the most-likely-to-be-misconfigured fields; previously set but unverified). 🤖 Generated by [robots](https://vyos.io)
2026-05-22Add VyOSElasticModernHost + placeholder engine stubYuriy Andamasov
Host class mirrors PhabricatorElasticsearchHost's surface. Engine is a stub providing only getEngineIdentifier() and getHostType() so the host's tests can construct an engine instance; real engine implementation lands in subsequent commits. All six abstract methods of PhabricatorFulltextStorageEngine are implemented (four as throwing stubs to be replaced in E7/E8). .arcconfig gains "src/" in the load list so arc unit can discover the extension library; test case extends PhutilTestCase (no DB needed for pure-PHP host property assertions). 🤖 Generated by [robots](https://vyos.io)