make the tests work

This commit is contained in:
Girish Ramakrishnan
2021-06-29 09:44:16 -07:00
parent 31498afe39
commit ea430b255b
11 changed files with 461 additions and 371 deletions

View File

@@ -19,7 +19,7 @@ describe('Volumes API', function () {
it('cannot create volume with bad name', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/volumes`)
.query({ access_token: owner.token })
.send({ name: 'music#/ ', hostPath: '/media/cloudron-test-music', mountType: 'noop', mountOptions: {} })
.send({ name: 'music#/ ', hostPath: '/media/cloudron-test-music', mountType: 'filesystem', mountOptions: {} })
.ok(() => true);
expect(response.statusCode).to.equal(400);
});
@@ -27,7 +27,7 @@ describe('Volumes API', function () {
it('cannot create volume with bad path', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/volumes`)
.query({ access_token: owner.token })
.send({ name: 'music', hostPath: '/tmp/music', mountType: 'noop', mountOptions: {} })
.send({ name: 'music', hostPath: '/tmp/music', mountType: 'filesystem', mountOptions: {} })
.ok(() => true);
expect(response.statusCode).to.equal(400);
});
@@ -35,7 +35,7 @@ describe('Volumes API', function () {
it('can create volume', async function () {
const response = await superagent.post(`${serverUrl}/api/v1/volumes`)
.query({ access_token: owner.token })
.send({ name: 'music', hostPath: '/media/cloudron-test-music', mountType: 'noop', mountOptions: {} })
.send({ name: 'music', hostPath: '/media/cloudron-test-music', mountType: 'filesystem', mountOptions: {} })
.ok(() => true);
expect(response.status).to.equal(201);