mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 15:30:41 +09:00
Fix expected error messages for assert rejects
This commit is contained in:
4 files changed
+13
-29
No files matched your search
@@ -154,22 +154,22 @@ describe("messages/plugin", function() {
|
||||
controller.config.set("controller.allow_plugin_install", true);
|
||||
await controlConnection.handlePluginInstallRequest(new lib.PluginInstallRequest("foo"));
|
||||
});
|
||||
it("rejects if updates are disabled on the controller", async function() {
|
||||
it("rejects if installs are disabled on the controller", async function() {
|
||||
controller.config.set("controller.allow_plugin_install", false);
|
||||
await assert.rejects(
|
||||
controlConnection.handlePluginInstallRequest(new lib.PluginInstallRequest("foo")),
|
||||
/Plugin updates are disabled on this machine/
|
||||
/Plugin installs are disabled on this machine/
|
||||
);
|
||||
});
|
||||
it("runs on a host", async function() {
|
||||
host.config.set("host.allow_plugin_install", true);
|
||||
await host.handlePluginInstallRequest(new lib.PluginInstallRequest("foo"));
|
||||
});
|
||||
it("rejects if updates are disabled on the host", async function() {
|
||||
it("rejects if installs are disabled on the host", async function() {
|
||||
host.config.set("host.allow_plugin_install", false);
|
||||
await assert.rejects(
|
||||
host.handlePluginInstallRequest(new lib.PluginInstallRequest("foo")),
|
||||
/Plugin updates are disabled on this machine/
|
||||
/Plugin installs are disabled on this machine/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user