rename create/deleteVolume to avoid confusion

This commit is contained in:
Girish Ramakrishnan
2018-09-14 10:18:43 -07:00
parent 9f6621434f
commit 46a00c839b
4 changed files with 75 additions and 21 deletions

View File

@@ -745,7 +745,13 @@ describe('App installation', function () {
it('installation - volume created', function (done) {
expect(fs.existsSync(paths.APPS_DATA_DIR + '/' + APP_ID));
done();
let volume = docker.getVolume(APP_ID + '-localstorage');
volume.inspect(function (error, volume) {
expect(error).to.be(null);
expect(volume.Labels.appId).to.eql(APP_ID);
expect(volume.Options.device).to.eql(paths.APPS_DATA_DIR + '/' + APP_ID + '/data');
done();
});
});
it('installation - http is up and running', function (done) {
@@ -781,13 +787,7 @@ describe('App installation', function () {
it('installation - running container has volume mounted', function (done) {
docker.getContainer(appEntry.containerId).inspect(function (error, data) {
expect(error).to.not.be.ok();
// support newer docker versions
if (data.Volumes) {
expect(data.Volumes['/app/data']).to.eql(paths.APPS_DATA_DIR + '/' + APP_ID + '/data');
} else {
expect(data.Mounts.filter(function (mount) { return mount.Destination === '/app/data'; })[0].Source).to.eql(paths.APPS_DATA_DIR + '/' + APP_ID + '/data');
}
expect(data.Mounts.filter(function (mount) { return mount.Destination === '/app/data'; })[0].Type).to.eql('volume');
done();
});