Skip to content

Commit

Permalink
Change: home templating in tests and add example output
Browse files Browse the repository at this point in the history
  • Loading branch information
NobleMajo committed Jun 2, 2024
1 parent 7885936 commit 7b9bfd6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hivessh",
"version": "1.0.5",
"version": "1.0.6",
"description": "HiveSsh simplifies SSH2 connections via promise-based task execution on Linux servers with built-in server utilities and powerful command execution functions",
"main": "dist/index.js",
"type": "module",
Expand Down
47 changes: 46 additions & 1 deletion src/test/ubuntuServer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ if (isNaN(Number(process.env.UBUNTU_TEST_PORT))) {
)
}

process.env.UBUNTU_TEST_KEYPATH =
process.env.UBUNTU_TEST_KEYPATH
.split("$HOME")
.join(process.env.HOME)

const host = await SshHost.connect({
host: process.env.UBUNTU_TEST_HOST,
user: process.env.UBUNTU_TEST_USER,
Expand Down Expand Up @@ -98,4 +103,44 @@ if (neofetchExists) {
}

host.close()
console.info("Works!")
console.info("Works!")

/*
Example test output:
Load os release info...
- os release: {
distroName: 'ubuntu',
distroVersion: '22.04',
meta: {
PRETTY_NAME: 'Ubuntu 22.04.4 LTS',
NAME: 'Ubuntu',
VERSION_ID: '22.04',
VERSION: '22.04.4 LTS (Jammy Jellyfish)',
VERSION_CODENAME: 'jammy',
ID: 'ubuntu',
ID_LIKE: 'debian',
HOME_URL: 'https://www.ubuntu.com/',
SUPPORT_URL: 'https://help.ubuntu.com/',
BUG_REPORT_URL: 'https://bugs.launchpad.net/ubuntu/',
PRIVACY_POLICY_URL: 'https://www.ubuntu.com/legal/terms-and-policies/privacy-policy',
UBUNTU_CODENAME: 'jammy',
DISTRIB_ID: 'Ubuntu',
DISTRIB_RELEASE: '22.04',
DISTRIB_CODENAME: 'jammy',
DISTRIB_DESCRIPTION: 'Ubuntu 22.04.4 LTS'
}
}
Load apm...
- apm.type: apt
Update cache...
Update packages...
List installed packages...
- installedPackages: 753
- neofetchExists: false
Install neofetch...
- neofetchExists: true
Uninstall neofetch...
- neofetchExists: false
Works!
*/

0 comments on commit 7b9bfd6

Please sign in to comment.