(t *testing.T)
| 73 | } |
| 74 | |
| 75 | func TestCollectNodeInfo(t *testing.T) { |
| 76 | ami := initCollectKubeAMI(t) |
| 77 | res, err := ami.CollectNodeInfo() |
| 78 | assert.NoError(t, err) |
| 79 | expected := map[string]interface{}{ |
| 80 | "node1": &specv1.NodeInfo{ |
| 81 | Hostname: "hostname", |
| 82 | Arch: "arch", |
| 83 | KernelVersion: "kernel", |
| 84 | OS: "os", |
| 85 | ContainerRuntime: "runtime", |
| 86 | MachineID: "machine", |
| 87 | BootID: "boot", |
| 88 | SystemUUID: "system", |
| 89 | OSImage: "image", |
| 90 | Role: "worker", |
| 91 | }, |
| 92 | } |
| 93 | assert.EqualValues(t, expected["node1"], res["node1"]) |
| 94 | } |
| 95 | |
| 96 | func TestGetContainerStatus(t *testing.T) { |
| 97 | info := &v1.ContainerStatus{} |
nothing calls this directly
no test coverage detected