Skip to content

Commit

Permalink
ssh key deploy test
Browse files Browse the repository at this point in the history
  • Loading branch information
dominusmars committed Feb 28, 2024
1 parent ae825c6 commit 229d4bd
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions tests/ssh.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,25 @@ for (let computer of computers) {
if (ssh) await ssh.close();
});

it("Can deploy SSH key to Server", async () => {
let ssh = await makeConnection(user, 3000, 3);
if (!ssh) {
throw new Error("Unable to connect to target server");
}
let sshkey = await ejectSSHkey(ssh, computer["OS Type"]);
assert.ok(sshkey, "Unable to enject SSH key");
ssh.close();
it("Can remove SSH key to Server", async () => {
describe("SSH Key", () => {
it("Can deploy to Server", async () => {
let ssh = await makeConnection(user, 3000, 3);
if (!ssh) {
throw new Error("Unable to connect to target server");
}
let sshkey = await ejectSSHkey(ssh, computer["OS Type"]);
assert.ok(sshkey, "Unable to inject SSH key");
await ssh.close();
});

it("Can remove from Server", async () => {
let ssh = await makeConnection(user, 3000, 3);
if (!ssh) {
throw new Error("Unable to connect to target server");
}
let sshkey = await removeSSHkey(ssh, computer["OS Type"]);
assert.ok(sshkey, "Unable to remove SSH key");
ssh.close();
await ssh.close();
});
});
});
Expand Down

0 comments on commit 229d4bd

Please sign in to comment.