@@ -256,29 +256,29 @@ func TestSplitUnstructureds(t *testing.T) {
256256 expectedObjs []* unstructured.Unstructured
257257 isError bool
258258 }{
259- "No objects is returns nil and no objects " : {
259+ "No objects returns error " : {
260260 allObjs : []* unstructured.Unstructured {},
261261 expectedInv : nil ,
262262 expectedObjs : []* unstructured.Unstructured {},
263- isError : false ,
263+ isError : true ,
264264 },
265265 "Only inventory object returns inv and no objects" : {
266266 allObjs : []* unstructured.Unstructured {inventoryObj },
267267 expectedInv : inventoryObj ,
268268 expectedObjs : []* unstructured.Unstructured {},
269269 isError : false ,
270270 },
271- "Single object returns nil inventory and object" : {
272- allObjs : []* unstructured.Unstructured {pod1 },
273- expectedInv : nil ,
271+ "Inventory object with single object returns inventory and object" : {
272+ allObjs : []* unstructured.Unstructured {inventoryObj , pod1 },
273+ expectedInv : inventoryObj ,
274274 expectedObjs : []* unstructured.Unstructured {pod1 },
275275 isError : false ,
276276 },
277- "Multiple non-inventory objects returns nil inventory and objs " : {
277+ "Multiple non-inventory objects returns error " : {
278278 allObjs : []* unstructured.Unstructured {pod1 , pod2 , pod3 },
279279 expectedInv : nil ,
280280 expectedObjs : []* unstructured.Unstructured {pod1 , pod2 , pod3 },
281- isError : false ,
281+ isError : true ,
282282 },
283283 "Inventory object with multiple others splits correctly" : {
284284 allObjs : []* unstructured.Unstructured {pod1 , pod2 , inventoryObj , pod3 },
0 commit comments