Make tests run again

This commit is contained in:
Girish Ramakrishnan
2023-03-09 19:54:04 +01:00
parent 3aa040bf01
commit 8e0d1b61af
6 changed files with 12 additions and 11 deletions

View File

@@ -32,18 +32,18 @@ describe('Volumes', function () {
let volume;
it('can add volume', async function () {
const id = await volumes.add({ name: 'music', hostPath: '/mnt/cloudron-test-music', mountType: 'filesystem', mountOptions: {} }, auditSource);
const id = await volumes.add({ name: 'music', mountType: 'filesystem', mountOptions: { hostPath: '/mnt/cloudron-test-music' } }, auditSource);
expect(id).to.be.a('string');
volume = { id, name: 'music', hostPath: '/mnt/cloudron-test-music' };
});
it('cannot add duplicate path', async function () {
const [error] = await safe(volumes.add({ name: 'music-dup', hostPath: '/mnt/cloudron-test-music', mountType: 'filesystem', mountOptions: {} }, auditSource));
const [error] = await safe(volumes.add({ name: 'music-dup', mountType: 'filesystem', mountOptions: { hostPath: '/mnt/cloudron-test-music' } }, auditSource));
expect(error.reason).to.be(BoxError.ALREADY_EXISTS);
});
it('cannot add duplicate name', async function () {
const [error] = await safe(volumes.add({ name: 'music', hostPath: '/mnt/cloudron-test-music2', mountType: 'filesystem', mountOptions: {} }, auditSource));
const [error] = await safe(volumes.add({ name: 'music', mountType: 'filesystem', mountOptions: { hostPath: '/mnt/cloudron-test-music2' } }, auditSource));
expect(error.reason).to.be(BoxError.ALREADY_EXISTS);
});