mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Remove dependency on kubelet related flags.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user