Merge pull request #81251 from oomichi/followup-pr81231

Remove runDeployment() from e2e test
This commit is contained in:
Kubernetes Prow Robot 2019-08-12 14:59:50 -07:00 committed by GitHub
commit e1f667765b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -478,7 +478,10 @@ func runServiceAndWorkloadForResourceConsumer(c clientset.Interface, ns, name st
dpConfig := testutils.DeploymentConfig{
RCConfig: rcConfig,
}
framework.ExpectNoError(runDeployment(dpConfig))
ginkgo.By(fmt.Sprintf("creating deployment %s in namespace %s", dpConfig.Name, dpConfig.Namespace))
dpConfig.NodeDumpFunc = framework.DumpNodeDebugInfo
dpConfig.ContainerDumpFunc = framework.LogFailedContainers
framework.ExpectNoError(testutils.RunDeployment(dpConfig))
break
case KindReplicaSet:
rsConfig := testutils.ReplicaSetConfig{
@ -553,11 +556,3 @@ func CreateCPUHorizontalPodAutoscaler(rc *ResourceConsumer, cpu, minReplicas, ma
func DeleteHorizontalPodAutoscaler(rc *ResourceConsumer, autoscalerName string) {
rc.clientSet.AutoscalingV1().HorizontalPodAutoscalers(rc.nsName).Delete(autoscalerName, nil)
}
// runDeployment runs a delopyment with the specified config.
func runDeployment(config testutils.DeploymentConfig) error {
ginkgo.By(fmt.Sprintf("creating deployment %s in namespace %s", config.Name, config.Namespace))
config.NodeDumpFunc = framework.DumpNodeDebugInfo
config.ContainerDumpFunc = framework.LogFailedContainers
return testutils.RunDeployment(config)
}