Revert "add volume support"
This reverts commit b8bb69f730.
Revert this for now, we will try a simpler non-object volume first
This commit is contained in:
@@ -1479,52 +1479,6 @@ describe('App API', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('volumes', function () {
|
||||
let volumeId;
|
||||
|
||||
it('can add volume', function (done) {
|
||||
superagent.post(SERVER_URL + '/api/v1/volumes')
|
||||
.query({ access_token: token })
|
||||
.send({ name: 'videos', hostPath: '/media/cloudron-test' })
|
||||
.end(function (err, res) {
|
||||
expect(res.statusCode).to.equal(201);
|
||||
expect(res.body.id).to.be.a('string');
|
||||
volumeId = res.body.id;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('can set volume', function (done) {
|
||||
superagent.post(SERVER_URL + '/api/v1/apps/' + APP_ID + '/configure/volumes')
|
||||
.query({ access_token: token })
|
||||
.send({ volumes: [ {id: volumeId, readOnly: false} ] })
|
||||
.end(function (err, res) {
|
||||
expect(res.statusCode).to.equal(202);
|
||||
taskId = res.body.taskId;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('wait for task', function (done) {
|
||||
waitForTask(taskId, done);
|
||||
});
|
||||
|
||||
it('did set volume', function (done) {
|
||||
apps.get(APP_ID, function (error, appEntry) {
|
||||
if (error) return done(error);
|
||||
|
||||
docker.getContainer(appEntry.containerId).inspect(function (error, data) {
|
||||
expect(error).to.not.be.ok();
|
||||
expect(data.Mounts.filter(function (mount) { return mount.Destination === '/media/videos'; })[0].Type).to.eql('volume');
|
||||
expect(data.Mounts.filter(function (mount) { return mount.Destination === '/media/videos'; })[0].Name).to.eql(volumeId);
|
||||
expect(data.Mounts.filter(function (mount) { return mount.Destination === '/media/videos'; })[0].RW).to.eql(true);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('start/stop', function () {
|
||||
it('non admin cannot stop app', function (done) {
|
||||
superagent.post(SERVER_URL + '/api/v1/apps/' + APP_ID + '/stop')
|
||||
|
||||
Reference in New Issue
Block a user