Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed equivalence cache tests #79828

Merged
merged 1 commit into from Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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