Skip to content

Commit

Permalink
moved exit command to end
Browse files Browse the repository at this point in the history
  • Loading branch information
dominusmars committed Mar 1, 2024
1 parent 76b4845 commit 020050c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/ssh.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,6 @@ for (let computer of computers) {
});
if (computer["OS Type"] == "windows") {
describe("Socket Commands", () => {
it("sendCommand", async () => {
let ssh = await makeConnection(user, 3000, 3);
if (!ssh) {
throw new Error("Unable to connect to target server");
}
let socket = await ssh.shell();
let result = await sendCommand(socket, "exit", true);
assert.ok(result.includes("exit"), "Didn't get expected output: " + result);
await ssh.close();
});
it("sendCommandExpect", async () => {
let ssh = await makeConnection(user, 3000, 3);
if (!ssh) {
Expand Down Expand Up @@ -172,6 +162,16 @@ for (let computer of computers) {

await ssh.close();
});
it("sendCommand", async () => {
let ssh = await makeConnection(user, 3000, 3);
if (!ssh) {
throw new Error("Unable to connect to target server");
}
let socket = await ssh.shell();
let result = await sendCommand(socket, "exit", true);
assert.ok(result.includes("exit"), "Didn't get expected output: " + result);
await ssh.close();
});
});
}

Expand Down

0 comments on commit 020050c

Please sign in to comment.