mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Fix flaking tests
This commit is contained in:
2 files changed
+6
-4
No files matched your search
@@ -286,11 +286,14 @@ describe("player_auth", function() {
|
|||||||
new SetVerifyCodeRequest("test", verify_code)
|
new SetVerifyCodeRequest("test", verify_code)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const user = controllerPlugin.controller.userManager.getByName("test");
|
||||||
|
const token = controllerPlugin.controller.userManager.signUserToken(user);
|
||||||
const verifyResult = await postJSON(
|
const verifyResult = await postJSON(
|
||||||
`${controllerUrl}/api/player_auth/verify`,
|
`${controllerUrl}/api/player_auth/verify`,
|
||||||
{ player_code: playerCode, verify_code, verify_token }
|
{ player_code: playerCode, verify_code, verify_token }
|
||||||
);
|
);
|
||||||
assert.equal((await verifyResult.json()).verified, true);
|
assert.equal(verifyResult.status, 200);
|
||||||
|
assert.deepEqual(await verifyResult.json(), { verified: true, token: token });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -707,9 +707,8 @@ describe("Integration of Clusterio", function() {
|
|||||||
for (let [, , configName, expectedResult] of testConfigs) {
|
for (let [, , configName, expectedResult] of testConfigs) {
|
||||||
assert.equal(await sendRcon(44, `/config get ${configName}`), `${expectedResult}\n`);
|
assert.equal(await sendRcon(44, `/config get ${configName}`), `${expectedResult}\n`);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
it("should not change the instance status", async function() {
|
// should not change instance status
|
||||||
slowTest(this);
|
|
||||||
await checkInstanceStatus(44, "running");
|
await checkInstanceStatus(44, "running");
|
||||||
});
|
});
|
||||||
it("should allow creating and removing props", async function() {
|
it("should allow creating and removing props", async function() {
|
||||||
|
|||||||
Reference in new issue
Block a user