check export port in many places

This commit is contained in:
Girish Ramakrishnan 2016-05-05 16:15:27 -07:00
parent 64b884eeef
commit 8b7eeafcd7
1 changed files with 13 additions and 1 deletions

View File

@ -67,7 +67,7 @@ describe('Application flow test', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can access exposed port', function (done) {
function checkExposedPort(done) {
var client = new net.Socket();
var data = [ ];
client.connect(5151, cloudron.appFqdn(location), function() {
@ -81,6 +81,10 @@ describe('Application flow test', function () {
done(new Error('bad response'));
});
client.on('error', done);
}
it('can access exposed port', function (done) {
checkExposedPort(done);
});
it('displays app graphs', function () {
@ -96,6 +100,10 @@ describe('Application flow test', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can access exposed port', function (done) {
checkExposedPort(done);
});
it('can reboot the cloudron', function () {
cloudron.reboot();
});
@ -104,6 +112,10 @@ describe('Application flow test', function () {
cloudron.checkAddons(cloudron.appFqdn(location), owner);
});
it('can access exposed port', function (done) {
checkExposedPort(done);
});
it('can uninstall app', function () {
cloudron.uninstallApp(appId);
});