return swap listing in the disk route

This commit is contained in:
Girish Ramakrishnan
2022-11-04 15:09:37 +01:00
parent c4c90cfaf9
commit 549cb92ce7
8 changed files with 50 additions and 20 deletions

View File

@@ -22,7 +22,16 @@ describe('System', function () {
const disks = await system.getDisks();
expect(disks).to.be.ok();
expect(disks.some(d => d.mountpoint === '/')).to.be.ok();
expect(Object.keys(disks).some(fs => disks[fs].mountpoint === '/')).to.be.ok();
});
it('can get swaps', async function () {
// does not work on archlinux 8!
if (require('child_process').execSync('uname -a').toString().indexOf('-arch') !== -1) return;
const swaps = await system.getSwaps();
expect(swaps).to.be.ok();
expect(Object.keys(swaps).some(n => swaps[n].type === 'partition')).to.be.ok();
});
it('can check for disk space', async function () {