mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 02:45:06 +00:00
chore: remove unused code (#12325)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
f8441701e3
commit
c55354d5a1
2 changed files with 1 additions and 12 deletions
|
@ -30,12 +30,3 @@ func ConvertObjectToUnstructured(obj any) (*unstructured.Unstructured, error) {
|
||||||
}
|
}
|
||||||
return &unstructured.Unstructured{Object: ret}, nil
|
return &unstructured.Unstructured{Object: ret}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConvertBytesToUnstructuredList(b []byte) (*unstructured.UnstructuredList, error) {
|
|
||||||
list := &unstructured.UnstructuredList{}
|
|
||||||
err := list.UnmarshalJSON(b)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return list, nil
|
|
||||||
}
|
|
||||||
|
|
|
@ -78,9 +78,7 @@ func TestConvertObjectToUnstructured(t *testing.T) {
|
||||||
"status": map[string]any{},
|
"status": map[string]any{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}}
|
||||||
// TODO: Add test cases.
|
|
||||||
}
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
got, err := ConvertObjectToUnstructured(tt.obj)
|
got, err := ConvertObjectToUnstructured(tt.obj)
|
||||||
|
|
Loading…
Add table
Reference in a new issue