Skip to content

Commit c5815c9

Browse files
committed
add error check
1 parent afff9d2 commit c5815c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/e2e2/integration_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ var _ = Describe("Atlas Third-Party Integrations Controller", Ordered, Label("in
100100
By("Prepare & apply test case objects", func() {
101101
for _, obj := range objs {
102102
objToApply := WithRandomAtlasProject(kube.WithRenamedNamespace(obj, testNamespace.Name))
103-
unstructuredData, _ := apiruntime.DefaultUnstructuredConverter.ToUnstructured(objToApply)
103+
unstructuredData, err := apiruntime.DefaultUnstructuredConverter.ToUnstructured(objToApply)
104+
Expect(err).NotTo(HaveOccurred(), "Conversion to unstructured data failed")
104105
unstructuredObject := &unstructured.Unstructured{Object: unstructuredData}
105106
Expect(
106107
kubeClient.Apply(ctx, client.ApplyConfigurationFromUnstructured(unstructuredObject.DeepCopy()), client.ForceOwnership, GinkGoFieldOwner),
@@ -126,7 +127,8 @@ var _ = Describe("Atlas Third-Party Integrations Controller", Ordered, Label("in
126127
By("Apply updates", func() {
127128
for _, objUpdate := range updates {
128129
objToPatch := WithRandomAtlasProject(kube.WithRenamedNamespace(objUpdate, testNamespace.Name))
129-
unstructuredData, _ := apiruntime.DefaultUnstructuredConverter.ToUnstructured(objToPatch)
130+
unstructuredData, err := apiruntime.DefaultUnstructuredConverter.ToUnstructured(objToPatch)
131+
Expect(err).NotTo(HaveOccurred(), "Conversion to unstructured data failed")
130132
unstructuredObject := &unstructured.Unstructured{Object: unstructuredData}
131133
Expect(
132134
kubeClient.Apply(ctx, client.ApplyConfigurationFromUnstructured(unstructuredObject.DeepCopy()), client.ForceOwnership, GinkGoFieldOwner),

0 commit comments

Comments
 (0)