Skip to content

Commit b086d29

Browse files
committed
move funcs in replicaset to autoscaling_utils
1 parent d758fc3 commit b086d29

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

test/e2e/framework/autoscaling/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ go_library(
1818
"//test/e2e/framework:go_default_library",
1919
"//test/e2e/framework/kubectl:go_default_library",
2020
"//test/e2e/framework/rc:go_default_library",
21-
"//test/e2e/framework/replicaset:go_default_library",
2221
"//test/e2e/framework/service:go_default_library",
2322
"//test/utils:go_default_library",
2423
"//test/utils/image:go_default_library",

test/e2e/framework/autoscaling/autoscaling_utils.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import (
3434
"k8s.io/kubernetes/test/e2e/framework"
3535
e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
3636
e2erc "k8s.io/kubernetes/test/e2e/framework/rc"
37-
"k8s.io/kubernetes/test/e2e/framework/replicaset"
3837
e2eservice "k8s.io/kubernetes/test/e2e/framework/service"
3938
testutils "k8s.io/kubernetes/test/utils"
4039

@@ -494,7 +493,7 @@ func runServiceAndWorkloadForResourceConsumer(c clientset.Interface, ns, name st
494493
RCConfig: rcConfig,
495494
}
496495
ginkgo.By(fmt.Sprintf("creating replicaset %s in namespace %s", rsConfig.Name, rsConfig.Namespace))
497-
framework.ExpectNoError(replicaset.RunReplicaSet(rsConfig))
496+
framework.ExpectNoError(runReplicaSet(rsConfig))
498497
default:
499498
framework.Failf(invalidKind)
500499
}
@@ -564,3 +563,11 @@ func CreateCPUHorizontalPodAutoscaler(rc *ResourceConsumer, cpu, minReplicas, ma
564563
func DeleteHorizontalPodAutoscaler(rc *ResourceConsumer, autoscalerName string) {
565564
rc.clientSet.AutoscalingV1().HorizontalPodAutoscalers(rc.nsName).Delete(autoscalerName, nil)
566565
}
566+
567+
// runReplicaSet launches (and verifies correctness) of a replicaset.
568+
func runReplicaSet(config testutils.ReplicaSetConfig) error {
569+
ginkgo.By(fmt.Sprintf("creating replicaset %s in namespace %s", config.Name, config.Namespace))
570+
config.NodeDumpFunc = framework.DumpNodeDebugInfo
571+
config.ContainerDumpFunc = e2ekubectl.LogFailedContainers
572+
return testutils.RunReplicaSet(config)
573+
}

test/e2e/framework/replicaset/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ go_library(
1616
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
1717
"//staging/src/k8s.io/client-go/kubernetes:go_default_library",
1818
"//test/e2e/framework:go_default_library",
19-
"//test/e2e/framework/kubectl:go_default_library",
2019
"//test/utils:go_default_library",
21-
"//vendor/github.com/onsi/ginkgo:go_default_library",
2220
],
2321
)
2422

test/e2e/framework/replicaset/wait.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,13 @@ package replicaset
1919
import (
2020
"fmt"
2121

22-
"github.com/onsi/ginkgo"
2322
appsv1 "k8s.io/api/apps/v1"
2423
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2524
"k8s.io/apimachinery/pkg/util/wait"
2625
clientset "k8s.io/client-go/kubernetes"
2726
"k8s.io/kubernetes/test/e2e/framework"
28-
e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
29-
testutils "k8s.io/kubernetes/test/utils"
3027
)
3128

32-
// RunReplicaSet launches (and verifies correctness) of a replicaset.
33-
func RunReplicaSet(config testutils.ReplicaSetConfig) error {
34-
ginkgo.By(fmt.Sprintf("creating replicaset %s in namespace %s", config.Name, config.Namespace))
35-
config.NodeDumpFunc = framework.DumpNodeDebugInfo
36-
config.ContainerDumpFunc = e2ekubectl.LogFailedContainers
37-
return testutils.RunReplicaSet(config)
38-
}
39-
4029
// WaitForReadyReplicaSet waits until the replicaset has all of its replicas ready.
4130
func WaitForReadyReplicaSet(c clientset.Interface, ns, name string) error {
4231
err := wait.Poll(framework.Poll, framework.PollShortTimeout, func() (bool, error) {

0 commit comments

Comments
 (0)