From 39832abc604b870b0cbf9b8f60e89db99fc7fec8 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 29 Jul 2016 16:17:49 +0200 Subject: [PATCH] Add selfhost migrate test --- test/selfhost-ec2-create-test.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/test/selfhost-ec2-create-test.js b/test/selfhost-ec2-create-test.js index 907cd0a..2530700 100644 --- a/test/selfhost-ec2-create-test.js +++ b/test/selfhost-ec2-create-test.js @@ -194,8 +194,7 @@ describe('Selfhost EC2 Cloudron creation', function () { '--yes', '--ssh-key ' + EC2_SSH_KEY, '--username ' + owner.username, - '--password ' + owner.password, - '--instance-id ' + newInstanceId + '--password ' + owner.password ]; var out = machine('update ' + params.join(' ')); @@ -215,6 +214,26 @@ describe('Selfhost EC2 Cloudron creation', function () { cloudron.checkAddons(cloudron.appFqdn(location), owner); }); + it('can migrate cloudron', function () { + var params = [ + '--fqdn ' + SELFHOST_DOMAIN, + '--ssh-key ' + EC2_SSH_KEY, + '--access-key-id ' + AWS_ACCESS_KEY, + '--secret-access-key ' + AWS_ACCESS_SECRET, + ]; + + var out = machine('migrate ' + params.join(' ')); + + if (out.stdout.indexOf('You can now use your Cloudron at') === -1) { + console.error(out.stdout, out.stderr); + assert(false, 'Update failed'); + } + }); + + it('runs the app', function () { + cloudron.waitForApp(appId); + }); + it('can uninstall app', function () { cloudron.uninstallApp(appId); });