Skip to content

Commit aab7ded

Browse files
E2E: fix static pod func
No func changes. Remove unused arg 'f'. Use the provided file path and delete the static pod file at the well-known location. Signed-off-by: Martin Kennelly <[email protected]>
1 parent 05ea4a8 commit aab7ded

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/e2e/static_pods.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func waitForPodRunningInNamespaceTimeout(c clientset.Interface, podName, namespa
3434
})
3535
}
3636

37-
func createStaticPod(f *framework.Framework, nodeName string, podYaml string) {
37+
func createStaticPod(nodeName string, podYaml string) {
3838
// FIXME; remove need to use a container runtime because its not portable
3939
runCommand := func(cmd ...string) (string, error) {
4040
output, err := exec.Command(cmd[0], cmd[1:]...).CombinedOutput()
@@ -72,7 +72,7 @@ func removeStaticPodFile(nodeName string, podFile string) {
7272
return string(output), nil
7373
}
7474

75-
cmd := []string{"docker", "exec", nodeName, "bash", "-c", "rm /etc/kubernetes/manifests/static-pod.yaml"}
75+
cmd := []string{"docker", "exec", nodeName, "bash", "-c", fmt.Sprintf("rm /etc/kubernetes/manifests/%s", podFile)}
7676
framework.Logf("Running command %v", cmd)
7777
_, err := runCommand(cmd...)
7878
if err != nil {
@@ -110,7 +110,7 @@ spec:
110110
image: %s
111111
command: ["/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"]
112112
`, f.Namespace.Name, images.AgnHost())
113-
createStaticPod(f, nodeName, staticPodYaml)
113+
createStaticPod(nodeName, staticPodYaml)
114114
err = waitForPodRunningInNamespaceTimeout(f.ClientSet, podName, f.Namespace.Name, time.Second*60)
115115
gomega.Expect(err).NotTo(gomega.HaveOccurred())
116116
ginkgo.By("Removing the pod file from the nodes /etc/kubernetes/manifests")

0 commit comments

Comments
 (0)