Code review comment for lp:~frankban/charms/trusty/juju-gui/custom-port

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Support user defined port.

Allow specifying a port on which the
GUI server starts listening for requests.

Tests: `make unittest`.

QA:
- bootstrap an environment;
- `make deploy`;
- wait for the unit to be deployed;
- visit the GUI URL, ensure port 80 redirects to 443 as usual
   and the GUI works as usual;
- switch to a customized port: `juju set juju-gui port=8080`;
- ensure the GUI is no longer reachable at port 80 or 443,
   instead it works correctly if you visit `https://<GUI-URL>:8080/`;
- switch to a another customized port: `juju set juju-gui port=443`;
- this time the GUI is still listening on default port for HTTPS,
   but port 80 no longer redirects to HTTPS;
- switch to an invalid port: `juju set juju-gui port=80000`;
- the GUI refuses to do that, and it falls back to using
   the default configuration: ensure port 80 redirects to 443;
- switch again to a customized valid port: `juju set juju-gui
port=12345`;
- ensure the GUI server is listening on that port;
- finally, unset the port value: `juju unset juju-gui port`;
- back to defaults: ensure port 80 redirects to 443;
- destroy the environment.

Done, thank you.

R=rharding, jeff.pihach
CC=
https://codereview.appspot.com/174170043

https://codereview.appspot.com/174170043/

« Back to merge proposal