mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 15:24:52 +09:00
Finish the plugin system integration tests
Adds the last three checks from #342 to test_plugin: an InstanceEcho request handled on a running instance, a Lua module with a remote interface that the request calls over RCON, and log tagging checks for the plugin field and host/instance ids on the controller, host and instance log lines. test_plugin now has a module, so the create_scenario and patch unit tests that relied on it having none use global_chat instead. Closes #342 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
35125a28ab
commit
9ab36151bd
8 files changed
+100
-4
No files matched your search
@@ -154,7 +154,7 @@ describe("host/create_scenario", function() {
|
||||
await fs.cp(scenario, freeplay, { recursive: true });
|
||||
pluginInfos = await lib.loadPluginInfos(new Map([
|
||||
["research_sync", path.resolve("plugins/research_sync")],
|
||||
["test_plugin", path.resolve("test/file/test_plugin")],
|
||||
["global_chat", path.resolve("plugins/global_chat")],
|
||||
]));
|
||||
lib.addPluginConfigFields(pluginInfos);
|
||||
hostConfig = new lib.HostConfig("host", { "host.factorio_directory": factorioDir });
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ describe("host/patch", function() {
|
||||
});
|
||||
it("should skip plugins without a module", async function() {
|
||||
const pluginInfos = await lib.loadPluginInfos(
|
||||
new Map([["test_plugin", path.resolve("test/file/test_plugin")]])
|
||||
new Map([["global_chat", path.resolve("plugins/global_chat")]])
|
||||
);
|
||||
const modules = await patch.loadModules(pluginInfos);
|
||||
assert.deepEqual([...modules.keys()], ["clusterio"]);
|
||||
|
||||
Reference in new issue
Block a user