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

Prevent 1.10 e2es testing deprecated CAdvisorPort in 1.11 #64184

Merged
merged 1 commit into from May 25, 2018
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
1 change: 1 addition & 0 deletions test/e2e/network/BUILD
Expand Up @@ -40,6 +40,7 @@ go_library(
"//pkg/controller/endpoint:go_default_library",
"//pkg/kubelet/apis:go_default_library",
"//pkg/master/ports:go_default_library",
"//pkg/util/version:go_default_library",
"//test/e2e/framework:go_default_library",
"//test/e2e/manifest:go_default_library",
"//test/e2e/network/scale:go_default_library",
Expand Down
15 changes: 14 additions & 1 deletion test/e2e/network/proxy.go
Expand Up @@ -33,6 +33,7 @@ import (
"k8s.io/apimachinery/pkg/util/net"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/pkg/api/testapi"
utilversion "k8s.io/kubernetes/pkg/util/version"
"k8s.io/kubernetes/test/e2e/framework"
testutils "k8s.io/kubernetes/test/utils"
imageutils "k8s.io/kubernetes/test/utils/image"
Expand All @@ -52,15 +53,25 @@ const (
proxyHTTPCallTimeout = 30 * time.Second
)

var deprecatedCAdvisorPortRemovedVersion = utilversion.MustParseSemantic("v1.11.0-alpha.0")

var _ = SIGDescribe("Proxy", func() {
version := testapi.Groups[v1.GroupName].GroupVersion().Version

Context("version "+version, func() {
options := framework.FrameworkOptions{
ClientQPS: -1.0,
}
f := framework.NewFramework("proxy", options, nil)
prefix := "/api/" + version

skipCAdvisorProxyTests := false
BeforeEach(func() {
var err error
skipCAdvisorProxyTests, err = framework.ServerVersionGTE(deprecatedCAdvisorPortRemovedVersion, f.ClientSet.Discovery())
Expect(err).NotTo(HaveOccurred())
})

/*
Testname: proxy-subresource-node-logs-port
Description: Ensure that proxy on node logs works with node proxy
Expand All @@ -74,7 +85,9 @@ var _ = SIGDescribe("Proxy", func() {
subresource.
*/
framework.ConformanceIt("should proxy logs on node using proxy subresource ", func() { nodeProxyTest(f, prefix+"/nodes/", "/proxy/logs/") })
It("should proxy to cadvisor using proxy subresource", func() { nodeProxyTest(f, prefix+"/nodes/", ":4194/proxy/containers/") })
if !skipCAdvisorProxyTests {
It("should proxy to cadvisor using proxy subresource", func() { nodeProxyTest(f, prefix+"/nodes/", ":4194/proxy/containers/") })
}

// using the porter image to serve content, access the content
// (of multiple pods?) from multiple (endpoints/services?)
Expand Down