From 9e17433ccf87e8fb8612a8c6ef996faec26fe6cd Mon Sep 17 00:00:00 2001 From: Kenichi Omichi Date: Fri, 9 Aug 2019 23:50:44 +0000 Subject: [PATCH] Remove runDeployment() from e2e test As https://github.com/kubernetes/kubernetes/pull/81231/files#r312670943 this removes runDeployment() by just moving some code into the test. --- test/e2e/common/autoscaling_utils.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/e2e/common/autoscaling_utils.go b/test/e2e/common/autoscaling_utils.go index cbc7c860c6b..6892b96e462 100644 --- a/test/e2e/common/autoscaling_utils.go +++ b/test/e2e/common/autoscaling_utils.go @@ -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) -}