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