mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
remove duplicate functions
This commit is contained in:
parent
a2b57b9fb2
commit
c9cbe41347
@ -1026,24 +1026,8 @@ func (j *TestJig) CheckServiceReachability(svc *v1.Service, pod *v1.Pod) error {
|
||||
}
|
||||
}
|
||||
|
||||
// CreateServicePods creates a replication controller with the label same as service. Service listens to HTTP.
|
||||
// CreateServicePods creates a replication controller with the label same as service. Service listens to TCP and UDP.
|
||||
func (j *TestJig) CreateServicePods(replica int) error {
|
||||
config := testutils.RCConfig{
|
||||
Client: j.Client,
|
||||
Name: j.Name,
|
||||
Image: framework.ServeHostnameImage,
|
||||
Command: []string{"/agnhost", "serve-hostname"},
|
||||
Namespace: j.Namespace,
|
||||
Labels: j.Labels,
|
||||
PollInterval: 3 * time.Second,
|
||||
Timeout: framework.PodReadyBeforeTimeout,
|
||||
Replicas: replica,
|
||||
}
|
||||
return e2erc.RunRC(config)
|
||||
}
|
||||
|
||||
// CreateTCPUDPServicePods creates a replication controller with the label same as service. Service listens to TCP and UDP.
|
||||
func (j *TestJig) CreateTCPUDPServicePods(replica int) error {
|
||||
config := testutils.RCConfig{
|
||||
Client: j.Client,
|
||||
Name: j.Name,
|
||||
|
@ -1228,7 +1228,7 @@ var _ = SIGDescribe("Services", func() {
|
||||
})
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
err = jig.CreateTCPUDPServicePods(2)
|
||||
err = jig.CreateServicePods(2)
|
||||
framework.ExpectNoError(err)
|
||||
execPod := e2epod.CreateExecPodOrFail(cs, ns, "execpod", nil)
|
||||
err = jig.CheckServiceReachability(nodePortService, execPod)
|
||||
|
Loading…
Reference in New Issue
Block a user