Node e2e test - fix and re-enable readonly volume test. Fixes #21320

pull/6/head
Phillip Wittrock 2016-02-29 14:35:54 -08:00
parent d1d036391a
commit b897981a11
1 changed files with 47 additions and 47 deletions

View File

@ -88,53 +88,53 @@ var _ = Describe("Kubelet", func() {
}) })
}) })
// TODO: Enable this when issues are resolved. Tracked in #21320 Context("when scheduling a read only busybox container", func() {
// Context("when scheduling a read only busybox container", func() { It("it should return success", func() {
// It("it should return success", func() { isReadOnly := true
// pod := &api.Pod{ pod := &api.Pod{
// ObjectMeta: api.ObjectMeta{ ObjectMeta: api.ObjectMeta{
// Name: "busybox", Name: "busybox",
// Namespace: api.NamespaceDefault, Namespace: api.NamespaceDefault,
// }, },
// Spec: api.PodSpec{ Spec: api.PodSpec{
// // Force the Pod to schedule to the node without a scheduler running // Force the Pod to schedule to the node without a scheduler running
// NodeName: *nodeName, NodeName: *nodeName,
// // Don't restart the Pod since it is expected to exit // Don't restart the Pod since it is expected to exit
// RestartPolicy: api.RestartPolicyNever, RestartPolicy: api.RestartPolicyNever,
// Containers: []api.Container{ Containers: []api.Container{
// { {
// Image: "gcr.io/google_containers/busybox", Image: "gcr.io/google_containers/busybox",
// Name: "busybox", Name: "busybox",
// Command: []string{"sh", "-c", "echo test > /file"}, Command: []string{"sh", "-c", "echo test > /file"},
// SecurityContext: &api.SecurityContext{ SecurityContext: &api.SecurityContext{
// ReadOnlyRootFilesystem: &isReadOnly, ReadOnlyRootFilesystem: &isReadOnly,
// }, },
// }, },
// }, },
// }, },
// } }
// _, err := cl.Pods(api.NamespaceDefault).Create(pod) _, err := cl.Pods(api.NamespaceDefault).Create(pod)
// Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err)) Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err))
// }) })
//
// It("it should not write to the root filesystem", func() { It("it should not write to the root filesystem", func() {
// Eventually(func() string { Eventually(func() string {
// rc, err := cl.Pods(api.NamespaceDefault).GetLogs("busybox", &api.PodLogOptions{}).Stream() rc, err := cl.Pods(api.NamespaceDefault).GetLogs("busybox", &api.PodLogOptions{}).Stream()
// if err != nil { if err != nil {
// return "" return ""
// } }
// defer rc.Close() defer rc.Close()
// buf := new(bytes.Buffer) buf := new(bytes.Buffer)
// buf.ReadFrom(rc) buf.ReadFrom(rc)
// return buf.String() return buf.String()
// }, time.Second*30, time.Second*4).Should(Equal("sh: can't create /file: Read-only file system")) }, time.Second*30, time.Second*4).Should(Equal("sh: can't create /file: Read-only file system\n"))
// }) })
//
// It("it should be possible to delete", func() { It("it should be possible to delete", func() {
// err := cl.Pods(api.NamespaceDefault).Delete("busybox", &api.DeleteOptions{}) err := cl.Pods(api.NamespaceDefault).Delete("busybox", &api.DeleteOptions{})
// Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err)) Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err))
// }) })
// }) })
}) })
Describe("metrics api", func() { Describe("metrics api", func() {