Move hostIP detection from master to server

Add PublicAddress in test files

Move valid public addr into util
This commit is contained in:
harry
2015-11-12 14:52:24 +08:00
parent fc927e8719
commit 477da92002
8 changed files with 47 additions and 18 deletions

View File

@@ -22,6 +22,7 @@ package integration
import (
"fmt"
"net"
"net/http"
"net/http/httptest"
"sync"
@@ -91,6 +92,7 @@ func TestUnschedulableNodes(t *testing.T) {
Authorizer: apiserver.NewAlwaysAllowAuthorizer(),
AdmissionControl: admit.NewAlwaysAdmit(),
StorageVersions: storageVersions,
PublicAddress: net.ParseIP("192.168.10.4"),
})
restClient := client.NewOrDie(&client.Config{Host: s.URL, GroupVersion: testapi.Default.GroupVersion()})
@@ -341,6 +343,7 @@ func BenchmarkScheduling(b *testing.B) {
Authorizer: apiserver.NewAlwaysAllowAuthorizer(),
AdmissionControl: admit.NewAlwaysAdmit(),
StorageVersions: storageVersions,
PublicAddress: net.ParseIP("192.168.10.4"),
})
c := client.NewOrDie(&client.Config{