Allow app volumes to be symlinked

The initial plan was to make app volumes to be set using a database
field but this makes the app backups non-portable. It also complicates
things wrt to app and server restores.

For now, ignore the problem and let them be symlinked.

Fixes #394
This commit is contained in:
Girish Ramakrishnan
2017-09-07 15:43:57 -07:00
parent 8d2f3b0217
commit 70acf1a719
3 changed files with 27 additions and 9 deletions

View File

@@ -138,9 +138,19 @@ describe('apptask', function () {
});
});
it('delete volume', function (done) {
apptask._deleteVolume(APP, function (error) {
it('delete volume - removeDirectory (false) ', function (done) {
apptask._deleteVolume(APP, { removeDirectory: false }, function (error) {
expect(!fs.existsSync(paths.APPS_DATA_DIR + '/' + APP.id + '/data')).to.be(true);
expect(fs.existsSync(paths.APPS_DATA_DIR + '/' + APP.id)).to.be(true);
expect(fs.readdirSync(paths.APPS_DATA_DIR + '/' + APP.id).length).to.be(0); // empty
expect(error).to.be(null);
done();
});
});
it('delete volume - removeDirectory (true) ', function (done) {
apptask._deleteVolume(APP, { removeDirectory: true }, function (error) {
expect(!fs.existsSync(paths.APPS_DATA_DIR + '/' + APP.id)).to.be(true);
expect(error).to.be(null);
done();
});