mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #86639 from tanjunchen/move-func-2019-12-26
move func EnableAndDisableInternalLB from test/e2e/framework/service …
This commit is contained in:
commit
13133857af
@ -94,12 +94,6 @@ func GetIngressPoint(ing *v1.LoadBalancerIngress) string {
|
||||
return host
|
||||
}
|
||||
|
||||
// EnableAndDisableInternalLB returns two functions for enabling and disabling the internal load balancer
|
||||
// setting for the supported cloud providers (currently GCE/GKE and Azure) and empty functions for others.
|
||||
func EnableAndDisableInternalLB() (enable func(svc *v1.Service), disable func(svc *v1.Service)) {
|
||||
return framework.TestContext.CloudConfig.Provider.EnableAndDisableInternalLB()
|
||||
}
|
||||
|
||||
// GetServiceLoadBalancerCreationTimeout returns a timeout value for creating a load balancer of a service.
|
||||
func GetServiceLoadBalancerCreationTimeout(cs clientset.Interface) time.Duration {
|
||||
nodes, err := e2enode.GetReadySchedulableNodes(cs)
|
||||
|
@ -2173,7 +2173,7 @@ var _ = SIGDescribe("Services", func() {
|
||||
_, err := jig.Run(nil)
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
enableILB, disableILB := e2eservice.EnableAndDisableInternalLB()
|
||||
enableILB, disableILB := enableAndDisableInternalLB()
|
||||
|
||||
isInternalEndpoint := func(lbIngress *v1.LoadBalancerIngress) bool {
|
||||
ingressEndpoint := e2eservice.GetIngressPoint(lbIngress)
|
||||
@ -3243,3 +3243,9 @@ func proxyMode(f *framework.Framework) (string, error) {
|
||||
framework.Logf("proxyMode: %s", stdout)
|
||||
return stdout, nil
|
||||
}
|
||||
|
||||
// enableAndDisableInternalLB returns two functions for enabling and disabling the internal load balancer
|
||||
// setting for the supported cloud providers (currently GCE/GKE and Azure) and empty functions for others.
|
||||
func enableAndDisableInternalLB() (enable func(svc *v1.Service), disable func(svc *v1.Service)) {
|
||||
return framework.TestContext.CloudConfig.Provider.EnableAndDisableInternalLB()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user