Make GenericApiServer.Run interruptable and fail on first listen

This commit is contained in:
Dr. Stefan Schimanski
2016-10-21 13:22:43 +02:00
parent cc84673ebe
commit d0b3981f07
9 changed files with 283 additions and 107 deletions

View File

@@ -77,7 +77,8 @@ func TestLongRunningRequestRegexp(t *testing.T) {
}
}
var insecurePort = 8082
var securePort = 6443 + 2
var insecurePort = 8080 + 2
var serverIP = fmt.Sprintf("http://localhost:%v", insecurePort)
var groupVersions = []unversioned.GroupVersion{
fed_v1b1.SchemeGroupVersion,
@@ -86,6 +87,7 @@ var groupVersions = []unversioned.GroupVersion{
func TestRun(t *testing.T) {
s := options.NewServerRunOptions()
s.GenericServerRunOptions.SecurePort = securePort
s.GenericServerRunOptions.InsecurePort = insecurePort
_, ipNet, _ := net.ParseCIDR("10.10.10.0/24")
s.GenericServerRunOptions.ServiceClusterIPRange = *ipNet