mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Remove kubectl from ephemeral container e2e
It's not available in the node e2e environment.
This commit is contained in:
parent
e1e97a0e47
commit
d31d0cc29a
@ -29,6 +29,7 @@ import (
|
|||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
|
|
||||||
"github.com/onsi/ginkgo"
|
"github.com/onsi/ginkgo"
|
||||||
|
"github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = SIGDescribe("Ephemeral Containers [NodeFeature:EphemeralContainers]", func() {
|
var _ = SIGDescribe("Ephemeral Containers [NodeFeature:EphemeralContainers]", func() {
|
||||||
@ -74,9 +75,11 @@ var _ = SIGDescribe("Ephemeral Containers [NodeFeature:EphemeralContainers]", fu
|
|||||||
framework.ExpectNoError(err, "Failed to patch ephemeral containers in pod %q", format.Pod(pod))
|
framework.ExpectNoError(err, "Failed to patch ephemeral containers in pod %q", format.Pod(pod))
|
||||||
|
|
||||||
ginkgo.By("checking pod container endpoints")
|
ginkgo.By("checking pod container endpoints")
|
||||||
_, err = framework.LookForStringInPodExecToContainer(pod.Namespace, pod.Name, ecName, []string{"/bin/echo", "marco"}, "marco", time.Minute)
|
// Can't use anything depending on kubectl here because it's not available in the node test environment
|
||||||
framework.ExpectNoError(err, "Failed to exec in pod %q ephemeral container %q", format.Pod(pod), ecName)
|
output := f.ExecCommandInContainer(pod.Name, ecName, "/bin/echo", "marco")
|
||||||
_, err = framework.LookForStringInLog(pod.Namespace, pod.Name, ecName, "polo", time.Minute)
|
gomega.Expect(output).To(gomega.ContainSubstring("marco"))
|
||||||
framework.ExpectNoError(err, "Failed to find logs in pod %q ephemeral container %q", format.Pod(pod), ecName)
|
log, err := e2epod.GetPodLogs(f.ClientSet, pod.Namespace, pod.Name, ecName)
|
||||||
|
framework.ExpectNoError(err, "Failed to get logs for pod %q ephemeral container %q", format.Pod(pod), ecName)
|
||||||
|
gomega.Expect(log).To(gomega.ContainSubstring("polo"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user