@@ -86,52 +86,53 @@ var _ = Describe("Kubelet", func() {
86
86
})
87
87
})
88
88
89
- Context ("when scheduling a read only busybox container" , func () {
90
- It ("it should return success" , func () {
91
- pod := & api.Pod {
92
- ObjectMeta : api.ObjectMeta {
93
- Name : "busybox" ,
94
- Namespace : api .NamespaceDefault ,
95
- },
96
- Spec : api.PodSpec {
97
- // Force the Pod to schedule to the node without a scheduler running
98
- NodeName : * nodeName ,
99
- // Don't restart the Pod since it is expected to exit
100
- RestartPolicy : api .RestartPolicyNever ,
101
- Containers : []api.Container {
102
- {
103
- Image : "gcr.io/google_containers/busybox" ,
104
- Name : "busybox" ,
105
- Command : []string {"sh" , "-c" , "echo test > /file" },
106
- SecurityContext : & api.SecurityContext {
107
- ReadOnlyRootFilesystem : & isReadOnly ,
108
- },
109
- },
110
- },
111
- },
112
- }
113
- _ , err := cl .Pods (api .NamespaceDefault ).Create (pod )
114
- Expect (err ).To (BeNil (), fmt .Sprintf ("Error creating Pod %v" , err ))
115
- })
116
-
117
- It ("it should not write to the root filesystem" , func () {
118
- Eventually (func () string {
119
- rc , err := cl .Pods (api .NamespaceDefault ).GetLogs ("busybox" , & api.PodLogOptions {}).Stream ()
120
- if err != nil {
121
- return ""
122
- }
123
- defer rc .Close ()
124
- buf := new (bytes.Buffer )
125
- buf .ReadFrom (rc )
126
- return buf .String ()
127
- }, time .Second * 30 , time .Second * 4 ).Should (Equal ("sh: can't create /file: Read-only file system" ))
128
- })
129
-
130
- It ("it should be possible to delete" , func () {
131
- err := cl .Pods (api .NamespaceDefault ).Delete ("busybox" , & api.DeleteOptions {})
132
- Expect (err ).To (BeNil (), fmt .Sprintf ("Error creating Pod %v" , err ))
133
- })
134
- })
89
+ // TODO: Enable this when issues are resolved. Tracked in #21320
90
+ // Context("when scheduling a read only busybox container", func() {
91
+ // It("it should return success", func() {
92
+ // pod := &api.Pod{
93
+ // ObjectMeta: api.ObjectMeta{
94
+ // Name: "busybox",
95
+ // Namespace: api.NamespaceDefault,
96
+ // },
97
+ // Spec: api.PodSpec{
98
+ // // Force the Pod to schedule to the node without a scheduler running
99
+ // NodeName: *nodeName,
100
+ // // Don't restart the Pod since it is expected to exit
101
+ // RestartPolicy: api.RestartPolicyNever,
102
+ // Containers: []api.Container{
103
+ // {
104
+ // Image: "gcr.io/google_containers/busybox",
105
+ // Name: "busybox",
106
+ // Command: []string{"sh", "-c", "echo test > /file"},
107
+ // SecurityContext: &api.SecurityContext{
108
+ // ReadOnlyRootFilesystem: &isReadOnly,
109
+ // },
110
+ // },
111
+ // },
112
+ // },
113
+ // }
114
+ // _, err := cl.Pods(api.NamespaceDefault).Create(pod)
115
+ // Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err))
116
+ // })
117
+ //
118
+ // It("it should not write to the root filesystem", func() {
119
+ // Eventually(func() string {
120
+ // rc, err := cl.Pods(api.NamespaceDefault).GetLogs("busybox", &api.PodLogOptions{}).Stream()
121
+ // if err != nil {
122
+ // return ""
123
+ // }
124
+ // defer rc.Close()
125
+ // buf := new(bytes.Buffer)
126
+ // buf.ReadFrom(rc)
127
+ // return buf.String()
128
+ // }, time.Second*30, time.Second*4).Should(Equal("sh: can't create /file: Read-only file system"))
129
+ // })
130
+ //
131
+ // It("it should be possible to delete", func() {
132
+ // err := cl.Pods(api.NamespaceDefault).Delete("busybox", &api.DeleteOptions{})
133
+ // Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err))
134
+ // })
135
+ // })
135
136
})
136
137
137
138
Describe ("metrics api" , func () {
0 commit comments