Do not automatically reboot the server but do this in a controlled fashion

Rebooting the server while connected via ssh often makes ssh return an
error code
This commit is contained in:
Johannes Zellner 2017-02-07 15:26:58 +01:00
parent baf8b57a20
commit d2072209b5

View File

@ -159,11 +159,13 @@ describe('Selfhost DigitalOcean with filesystem backend', function () {
assert.strictEqual(out.status, 0);
console.log('run cloudron-setup');
out = machine('ssh ' + params.concat(['"./cloudron-setup --provider digitalocean --prerelease --version ' + toVersion + ' --env staging"']).join(' '));//, { stdout: process.stdout, stderr: process.stderr });
out = machine('ssh ' + params.concat(['"./cloudron-setup --provider digitalocean --prerelease --version ' + toVersion + ' --env staging --skip-reboot"']).join(' '));
console.log(out.stdout, out.stderr);
assert.strictEqual(out.status, 0);
// due to the reboot, we might get a non 0 status code
assert(out.status === 0 || out.stdout.indexOf('Rebooting this server now to let bootloader changes take effect.') !== -1);
console.log('reboot the server');
out = machine('ssh ' + params.concat(['systemctl reboot']).join(' '));
console.log(out.stdout, out.stderr);
});
it('can setup dns', function () {