mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
Move hostIP detection from master to server
Add PublicAddress in test files Move valid public addr into util
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
@@ -420,6 +421,7 @@ func TestAuthModeAlwaysAllow(t *testing.T) {
|
||||
Authorizer: apiserver.NewAlwaysAllowAuthorizer(),
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
transport := http.DefaultTransport
|
||||
@@ -549,6 +551,7 @@ func TestAuthModeAlwaysDeny(t *testing.T) {
|
||||
Authorizer: apiserver.NewAlwaysDenyAuthorizer(),
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
transport := http.DefaultTransport
|
||||
@@ -630,6 +633,7 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) {
|
||||
Authorizer: allowAliceAuthorizer{},
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
previousResourceVersion := make(map[string]float64)
|
||||
@@ -730,6 +734,7 @@ func TestBobIsForbidden(t *testing.T) {
|
||||
Authorizer: allowAliceAuthorizer{},
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
transport := http.DefaultTransport
|
||||
@@ -804,6 +809,7 @@ func TestUnknownUserIsUnauthorized(t *testing.T) {
|
||||
Authorizer: allowAliceAuthorizer{},
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
transport := http.DefaultTransport
|
||||
@@ -903,6 +909,7 @@ func TestAuthorizationAttributeDetermination(t *testing.T) {
|
||||
Authorizer: trackingAuthorizer,
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
transport := http.DefaultTransport
|
||||
@@ -997,6 +1004,7 @@ func TestNamespaceAuthorization(t *testing.T) {
|
||||
Authorizer: a,
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
previousResourceVersion := make(map[string]float64)
|
||||
@@ -1125,6 +1133,7 @@ func TestKindAuthorization(t *testing.T) {
|
||||
Authorizer: a,
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
previousResourceVersion := make(map[string]float64)
|
||||
@@ -1240,6 +1249,7 @@ func TestReadOnlyAuthorization(t *testing.T) {
|
||||
Authorizer: a,
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
transport := http.DefaultTransport
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -21,6 +21,7 @@ package integration
|
||||
// This file tests use of the secrets API resource.
|
||||
|
||||
import (
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
@@ -81,6 +82,7 @@ func TestSecrets(t *testing.T) {
|
||||
Authorizer: apiserver.NewAlwaysAllowAuthorizer(),
|
||||
AdmissionControl: admit.NewAlwaysAdmit(),
|
||||
StorageVersions: storageVersions,
|
||||
PublicAddress: net.ParseIP("192.168.10.4"),
|
||||
})
|
||||
|
||||
framework.DeleteAllEtcdKeys()
|
||||
|
||||
Reference in New Issue
Block a user