test: add more system tests

This commit is contained in:
Girish Ramakrishnan
2025-07-20 10:20:48 +02:00
parent 0e3cc97ee6
commit d857ca46e0
+11 -1
View File
@@ -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);