(t *testing.T)
| 292 | } |
| 293 | |
| 294 | func TestFetchPodsNameList(t *testing.T) { |
| 295 | client := fake.NewSimpleClientset( |
| 296 | &v1.Pod{ |
| 297 | ObjectMeta: metav1.ObjectMeta{ |
| 298 | Name: "myPod", |
| 299 | Labels: map[string]string{ |
| 300 | "spec.nodeName": nodeName, |
| 301 | }, |
| 302 | }, |
| 303 | }, |
| 304 | &v1.Node{ |
| 305 | ObjectMeta: metav1.ObjectMeta{ |
| 306 | Name: nodeName, |
| 307 | }, |
| 308 | }, |
| 309 | ) |
| 310 | |
| 311 | tNode := getNode(t, getDrainHelper(client)) |
| 312 | podList, err := tNode.FetchPodNameList(nodeName) |
| 313 | h.Ok(t, err) |
| 314 | h.Equals(t, []string{"myPod"}, podList) |
| 315 | } |
| 316 | |
| 317 | func TestLogPods(t *testing.T) { |
| 318 | client := fake.NewSimpleClientset( |
nothing calls this directly
no test coverage detected