Skip to content

Commit

Permalink
Merge pull request #79828 from akremsa/remove_eq_cache_tests
Browse files Browse the repository at this point in the history
Removed equivalence cache tests
  • Loading branch information
k8s-ci-robot committed Aug 23, 2019
2 parents 57e0aff + ff7b07c commit 66d3572
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 309 deletions.
4 changes: 2 additions & 2 deletions test/e2e/autoscaling/cluster_size_autoscaling.go
Expand Up @@ -574,8 +574,8 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
framework.AddOrUpdateLabelOnNode(c, node, labelKey, labelValue)
}

scheduling.CreateNodeSelectorPods(f, "node-selector", minSize+1, map[string]string{labelKey: labelValue}, false)

err = scheduling.CreateNodeSelectorPods(f, "node-selector", minSize+1, map[string]string{labelKey: labelValue}, false)
framework.ExpectNoError(err)
ginkgo.By("Waiting for new node to appear and annotating it")
framework.WaitForGroupSize(minMig, int32(minSize+1))
// Verify that cluster size is increased
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/scheduling/BUILD
Expand Up @@ -3,7 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"equivalence_cache_predicates.go",
"events.go",
"framework.go",
"limit_range.go",
Expand All @@ -19,7 +18,6 @@ go_library(
importpath = "k8s.io/kubernetes/test/e2e/scheduling",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/core:go_default_library",
"//pkg/apis/core/v1/helper/qos:go_default_library",
"//pkg/apis/extensions:go_default_library",
"//pkg/apis/scheduling:go_default_library",
Expand Down
304 changes: 0 additions & 304 deletions test/e2e/scheduling/equivalence_cache_predicates.go

This file was deleted.

27 changes: 26 additions & 1 deletion test/e2e/scheduling/predicates.go
Expand Up @@ -38,11 +38,15 @@ import (
imageutils "k8s.io/kubernetes/test/utils/image"

"github.com/onsi/ginkgo"

// ensure libs have a chance to initialize
_ "github.com/stretchr/testify/assert"
)

const maxNumberOfPods int64 = 10
const (
maxNumberOfPods int64 = 10
defaultTimeout = 3 * time.Minute
)

var localStorageVersion = utilversion.MustParseSemantic("v1.8.0-beta.0")

Expand Down Expand Up @@ -807,6 +811,27 @@ func CreateHostPortPods(f *framework.Framework, id string, replicas int, expectR
}
}

// CreateNodeSelectorPods creates RC with host port 4321 and defines node selector
func CreateNodeSelectorPods(f *framework.Framework, id string, replicas int, nodeSelector map[string]string, expectRunning bool) error {
ginkgo.By(fmt.Sprintf("Running RC which reserves host port and defines node selector"))

config := &testutils.RCConfig{
Client: f.ClientSet,
Name: id,
Namespace: f.Namespace.Name,
Timeout: defaultTimeout,
Image: imageutils.GetPauseImageName(),
Replicas: replicas,
HostPorts: map[string]int{"port1": 4321},
NodeSelector: nodeSelector,
}
err := framework.RunRC(*config)
if expectRunning {
return err
}
return nil
}

// create pod which using hostport on the specified node according to the nodeSelector
func createHostPortPodOnNode(f *framework.Framework, podName, ns, hostIP string, port int32, protocol v1.Protocol, nodeSelector map[string]string, expectScheduled bool) {
hostIP = framework.TranslateIPv4ToIPv6(hostIP)
Expand Down

0 comments on commit 66d3572

Please sign in to comment.