Remove dependency on kubelet related flags.

This commit is contained in:
Random-Liu
2016-11-14 23:02:56 -08:00
parent 08204bea62
commit 090809d8ad
6 changed files with 29 additions and 24 deletions

View File

@@ -37,14 +37,16 @@ import (
var _ = framework.KubeDescribe("MirrorPod", func() {
f := framework.NewDefaultFramework("mirror-pod")
Context("when create a mirror pod ", func() {
var ns, staticPodName, mirrorPodName string
var ns, manifestPath, staticPodName, mirrorPodName string
BeforeEach(func() {
ns = f.Namespace.Name
staticPodName = "static-pod-" + string(uuid.NewUUID())
mirrorPodName = staticPodName + "-" + framework.TestContext.NodeName
manifestPath = framework.TestContext.KubeletConfig.PodManifestPath
By("create the static pod")
err := createStaticPod(framework.TestContext.ManifestPath, staticPodName, ns,
err := createStaticPod(manifestPath, staticPodName, ns,
"gcr.io/google_containers/nginx-slim:0.7", api.RestartPolicyAlways)
Expect(err).ShouldNot(HaveOccurred())
@@ -61,7 +63,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() {
By("update the static pod container image")
image := framework.GetPauseImageNameForHostArch()
err = createStaticPod(framework.TestContext.ManifestPath, staticPodName, ns, image, api.RestartPolicyAlways)
err = createStaticPod(manifestPath, staticPodName, ns, image, api.RestartPolicyAlways)
Expect(err).ShouldNot(HaveOccurred())
By("wait for the mirror pod to be updated")
@@ -107,7 +109,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() {
})
AfterEach(func() {
By("delete the static pod")
err := deleteStaticPod(framework.TestContext.ManifestPath, staticPodName, ns)
err := deleteStaticPod(manifestPath, staticPodName, ns)
Expect(err).ShouldNot(HaveOccurred())
By("wait for the mirror pod to disappear")