Add flags to customize listen ports and detect port collisions

This commit is contained in:
Manuel de Brito Fontes 2017-08-24 10:33:26 -03:00
parent 02e20eb81a
commit 0459674931
12 changed files with 127 additions and 47 deletions

View file

@ -175,7 +175,9 @@ func TestTemplateWithData(t *testing.T) {
if err := json.Unmarshal(data, &dat); err != nil {
t.Errorf("unexpected error unmarshalling json: %v", err)
}
if dat.ListenPorts == nil {
dat.ListenPorts = &config.ListenPorts{}
}
tf, err := os.Open(path.Join(pwd, "../../rootfs/etc/nginx/template/nginx.tmpl"))
if err != nil {
t.Errorf("unexpected error reading json file: %v", err)