remove duplicate functions

This commit is contained in:
Antonio Ojea 2021-02-22 17:39:50 +01:00
parent a2b57b9fb2
commit c9cbe41347
2 changed files with 2 additions and 18 deletions

View File

@ -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,

View File

@ -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)