cerrado @ 98b4a72f1776d0343c0649920f031723e5ca0e47

  1diff --git a/pkg/config/config.go b/pkg/config/config.go
  2index 0e85b5abb5231e21caf6a1a3db5c6168709cc10b..6ac6d0560dddf90e88fdce766d2a0261d5a4ab2c 100644
  3--- a/pkg/config/config.go
  4+++ b/pkg/config/config.go
  5@@ -227,7 +227,7 @@ func defaultConfiguration() *configuration {
  6 	return &configuration{
  7 		Scan:         defaultScan(),
  8 		RootReadme:   "",
  9-		ListenAddr:   "http//0.0.0.0:8080",
 10+		ListenAddr:   defaultAddr(),
 11 		Repositories: make([]*GitRepositoryConfiguration, 0),
 12 	}
 13 }
 14@@ -237,7 +237,10 @@ 	return &scan{
 15 		Public: false,
 16 		Path:   "",
 17 	}
 18+}
 19 
 20+func defaultAddr() string {
 21+	return "tcp://localhost:8080"
 22 }
 23 
 24 func defaultRepisotryConfiguration(path string) *GitRepositoryConfiguration {
 25diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go
 26index 9109ecb47e242baa141860f478524b2299f33d8a..2d779c53ce9aee562d0e7d57e354b7470aa534de 100644
 27--- a/pkg/config/config_test.go
 28+++ b/pkg/config/config_test.go
 29@@ -22,6 +22,7 @@ 				Scan: &scan{
 30 					Public: false,
 31 					Path:   "/srv/git",
 32 				},
 33+				ListenAddr:   defaultAddr(),
 34 				Repositories: []*GitRepositoryConfiguration{},
 35 			},
 36 		},
 37@@ -36,6 +37,7 @@ 				Scan: &scan{
 38 					Public: true,
 39 					Path:   "/srv/git",
 40 				},
 41+				ListenAddr:   defaultAddr(),
 42 				Repositories: []*GitRepositoryConfiguration{},
 43 			},
 44 		},
 45@@ -43,7 +45,8 @@ 		{
 46 			name:   "minimal repository",
 47 			config: `repository /srv/git/cerrado.git`,
 48 			expectedConfig: &configuration{
 49-				Scan: defaultScan(),
 50+				Scan:       defaultScan(),
 51+				ListenAddr: defaultAddr(),
 52 				Repositories: []*GitRepositoryConfiguration{
 53 					{
 54 						Name:        "cerrado.git",
 55@@ -63,7 +66,8 @@ 	description "Single person forge"
 56 	public true
 57 }`,
 58 			expectedConfig: &configuration{
 59-				Scan: defaultScan(),
 60+				Scan:       defaultScan(),
 61+				ListenAddr: defaultAddr(),
 62 				Repositories: []*GitRepositoryConfiguration{
 63 					{
 64 						Name:        "cerrado",
 65@@ -75,8 +79,28 @@ 				},
 66 			},
 67 		},
 68 		{
 69+			name:   "minimal listen",
 70+			config: ``,
 71+			expectedConfig: &configuration{
 72+				Scan:         defaultScan(),
 73+				ListenAddr:   defaultAddr(),
 74+				Repositories: []*GitRepositoryConfiguration{},
 75+			},
 76+		},
 77+		{
 78+			name:   "complete listen",
 79+			config: `listen-addr unix://var/run/cerrado/cerrado.sock`,
 80+			expectedConfig: &configuration{
 81+				Scan:         defaultScan(),
 82+				ListenAddr:   "unix://var/run/cerrado/cerrado.sock",
 83+				Repositories: []*GitRepositoryConfiguration{},
 84+			},
 85+		},
 86+		{
 87 			name: "complete",
 88 			config: `
 89+listen-addr unix://var/run/cerrado/cerrado.sock
 90+
 91 scan "/srv/git" {
 92 	public true
 93 }
 94@@ -93,6 +117,7 @@ 				Scan: &scan{
 95 					Public: true,
 96 					Path:   "/srv/git",
 97 				},
 98+				ListenAddr: "unix://var/run/cerrado/cerrado.sock",
 99 				Repositories: []*GitRepositoryConfiguration{
100 					{
101 						Name:        "linux.git",