test: add more system tests
This commit is contained in:
+11
-1
@@ -76,9 +76,19 @@ describe('System', function () {
|
||||
expect(info.rebootRequired).to.be.a('boolean');
|
||||
});
|
||||
|
||||
it('can get block devices', async function () {
|
||||
const devices = await system.getBlockDevices();
|
||||
expect(devices.some(d => d.mountpoint === '/')).to.be(true);
|
||||
});
|
||||
|
||||
it('can get filesystems', async function () {
|
||||
const filesystems = await system.getFilesystems();
|
||||
expect(filesystems.find(v => v.mountpoint === '/')).to.be.ok();
|
||||
});
|
||||
|
||||
it('can get filesystemUsage', async function () {
|
||||
const filesystems = await system.getFilesystems();
|
||||
const rootFs = Object.values(filesystems).find(v => v.mountpoint === '/');
|
||||
const rootFs = filesystems.find(v => v.mountpoint === '/');
|
||||
expect(rootFs.filesystem).to.be.ok();
|
||||
|
||||
const usageTask = await system.getFilesystemUsage(rootFs.filesystem);
|
||||
|
||||
Reference in New Issue
Block a user