create backup before clone
This commit is contained in:
parent
13292e5aba
commit
4a11b3432b
@ -399,6 +399,13 @@ Cloudron.prototype.resetPassword = function (resetToken, password) {
|
||||
assert.strictEqual(res.statusCode, 302);
|
||||
};
|
||||
|
||||
Cloudron.prototype.backupApp = function (appId) {
|
||||
var res = request.post(this._origin + '/api/v1/apps/' + appId + '/backup').query({ access_token: this._credentials.accessToken }).end();
|
||||
common.verifyResponse2xx(res, 'Could not schedule backup');
|
||||
|
||||
this.waitForApp(appId);
|
||||
};
|
||||
|
||||
Cloudron.prototype.backup = function () {
|
||||
var res = request.get(this._origin + '/api/v1/backups').query({ access_token: this._credentials.accessToken }).end();
|
||||
common.verifyResponse2xx(res, 'Could not get backups');
|
||||
|
@ -120,6 +120,11 @@ describe('Application flow test', function () {
|
||||
checkExposedPort(5151, done);
|
||||
});
|
||||
|
||||
// clone requires a backup to work with
|
||||
it('can backup app', function () {
|
||||
cloudron.backupApp(appId);
|
||||
});
|
||||
|
||||
var cloneLocation;
|
||||
it('can clone app', function () {
|
||||
cloneLocation = location + 'clone';
|
||||
|
@ -95,6 +95,11 @@ describe('Appstore new user flow', function () {
|
||||
cloudron.configureApp(appId, location);
|
||||
});
|
||||
|
||||
// clone requires a backup to work with
|
||||
it('can backup app', function () {
|
||||
cloudron.backupApp(appId);
|
||||
});
|
||||
|
||||
it('can clone app', function () {
|
||||
cloudron.cloneApp(appId, location + 'clone');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user