mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Spawn master, slave, and clusterctl in separate processes in the clusterio integration tests and leave the test master and slave process available for the whole test duration to allow plugins to use them as well. This removes the need for reimplementing the startup logic in the test code and makes the existing startup code covered by tests.
19 lines
577 B
JavaScript
19 lines
577 B
JavaScript
const assert = require('assert').strict;
|
|
|
|
const mock = require('./mock');
|
|
const master = require('../master');
|
|
|
|
|
|
describe('Master testing', function() {
|
|
describe("class WebSocketServerConnector", function() {
|
|
let testConnector = new master._WebSocketServerConnector(new mock.MockSocket());
|
|
describe(".disconnect()", function() {
|
|
it("should call disconnect on the socket", function() {
|
|
testConnector._socket.terminateCalled = false;
|
|
testConnector.disconnect();
|
|
assert(testConnector._socket.terminateCalled, "Terminate was not called");
|
|
});
|
|
});
|
|
});
|
|
});
|