(t *testing.T)
| 116 | }) |
| 117 | |
| 118 | func TestCleanUpFuse(t *testing.T) { |
| 119 | var testCase = []struct { |
| 120 | name string |
| 121 | namespace string |
| 122 | wantedNodeLabels map[string]map[string]string |
| 123 | wantedCount int |
| 124 | context cruntime.ReconcileRequestContext |
| 125 | log logr.Logger |
| 126 | runtimeType string |
| 127 | nodeInputs []*corev1.Node |
| 128 | }{ |
| 129 | { |
| 130 | wantedCount: 1, |
| 131 | name: "hbase", |
| 132 | namespace: "fluid", |
| 133 | wantedNodeLabels: map[string]map[string]string{ |
| 134 | "no-fuse": {}, |
| 135 | "multiple-fuse": { |
| 136 | "fluid.io/f-fluid-hadoop": "true", |
| 137 | "node-select": "true", |
| 138 | "fluid.io/s-fluid-hbase": "true", |
| 139 | "fluid.io/s-h-jindo-d-fluid-hbase": "5B", |
| 140 | "fluid.io/s-h-jindo-m-fluid-hbase": "1B", |
| 141 | "fluid.io/s-h-jindo-t-fluid-hbase": "6B", |
| 142 | }, |
| 143 | "fuse": { |
| 144 | "fluid.io/dataset-num": "1", |
| 145 | "fluid.io/f-fluid-hadoop": "true", |
| 146 | "node-select": "true", |
| 147 | }, |
| 148 | }, |
| 149 | log: fake.NullLogger(), |
| 150 | runtimeType: "jindo", |
| 151 | nodeInputs: []*corev1.Node{ |
| 152 | { |
| 153 | ObjectMeta: metav1.ObjectMeta{ |
| 154 | Name: "no-fuse", |
| 155 | Labels: map[string]string{}, |
| 156 | }, |
| 157 | }, |
| 158 | { |
| 159 | ObjectMeta: metav1.ObjectMeta{ |
| 160 | Name: "multiple-fuse", |
| 161 | Labels: map[string]string{ |
| 162 | "fluid.io/f-fluid-hadoop": "true", |
| 163 | "node-select": "true", |
| 164 | "fluid.io/f-fluid-hbase": "true", |
| 165 | "fluid.io/s-fluid-hbase": "true", |
| 166 | "fluid.io/s-h-jindo-d-fluid-hbase": "5B", |
| 167 | "fluid.io/s-h-jindo-m-fluid-hbase": "1B", |
| 168 | "fluid.io/s-h-jindo-t-fluid-hbase": "6B", |
| 169 | }, |
| 170 | }, |
| 171 | }, |
| 172 | { |
| 173 | ObjectMeta: metav1.ObjectMeta{ |
| 174 | Name: "fuse", |
| 175 | Labels: map[string]string{ |
nothing calls this directly
no test coverage detected