mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +09:00
Fix ctl slave generate-token command
Fix missing link -> libLink rename in clusterioctl slave generate-token command as well as missing this reference.
This commit is contained in:
1 parent
6cb33a8b63
commit
3ce32ba870
3 files changed
+7
-2
No files matched your search
+1
-1
@@ -73,7 +73,7 @@ slaveCommands.add(new libCommand.Command({
|
||||
yargs.option("id", { type: "number", nargs: 1, describe: "Slave id", demandOption: true });
|
||||
}],
|
||||
handler: async function(args, control) {
|
||||
let response = await link.messages.generateSlaveToken.send(control, { slave_id: args.id });
|
||||
let response = await libLink.messages.generateSlaveToken.send(control, { slave_id: args.id });
|
||||
console.log(response.token);
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -598,7 +598,7 @@ class ControlConnection extends BaseConnection {
|
||||
}
|
||||
|
||||
async generateSlaveTokenRequestHandler(message) {
|
||||
return { token: generateSlaveToken(message.data.slave_id) };
|
||||
return { token: this.generateSlaveToken(message.data.slave_id) };
|
||||
}
|
||||
|
||||
async createSlaveConfigRequestHandler(message) {
|
||||
|
||||
@@ -25,6 +25,11 @@ describe("Integration of Clusterio", function() {
|
||||
await execCtl("slave list");
|
||||
});
|
||||
});
|
||||
describe("slave generate-token", function() {
|
||||
it("runs", async function() {
|
||||
await execCtl("slave generate-token --id 42");
|
||||
});
|
||||
});
|
||||
describe("instance list", function() {
|
||||
it("runs", async function() {
|
||||
await execCtl("instance list");
|
||||
|
||||
Reference in new issue
Block a user