Skip to content

Commit

Permalink
Remove unused params in suspend test
Browse files Browse the repository at this point in the history
  • Loading branch information
ranatrk committed Nov 15, 2023
1 parent 253c8f5 commit a9a394b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/server/suspend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func TestSuspend_Suspend(t *testing.T) {
g.Expect(err).NotTo(HaveOccurred())
name := types.NamespacedName{Name: tt.obj.GetName(), Namespace: ns.Name}

unstructuredObj := getUnstructuredObj(t, k, name, tt.obj, tt.kind, tt.apiVersion)
unstructuredObj := getUnstructuredObj(t, k, name, tt.kind, tt.apiVersion)
suspendVal, _, err := unstructured.NestedBool(unstructuredObj.Object, "spec", "suspend")
g.Expect(err).NotTo(HaveOccurred())
g.Expect(suspendVal).To(BeTrue())
Expand All @@ -130,13 +130,12 @@ func TestSuspend_Suspend(t *testing.T) {

for _, tt := range tests {
name := types.NamespacedName{Name: tt.obj.GetName(), Namespace: ns.Name}
unstructuredObj := getUnstructuredObj(t, k, name, tt.obj, tt.kind, tt.apiVersion)
unstructuredObj := getUnstructuredObj(t, k, name, tt.kind, tt.apiVersion)
suspendVal, _, err := unstructured.NestedBool(unstructuredObj.Object, "spec", "suspend")
g.Expect(err).NotTo(HaveOccurred())
g.Expect(suspendVal).To(BeFalse())

checkSuspendAnnotations(t, principalID, unstructuredObj.GetAnnotations(), name, suspendVal)

}
})

Expand All @@ -161,7 +160,7 @@ func TestSuspend_Suspend(t *testing.T) {
})
}

func getUnstructuredObj(t *testing.T, k client.Client, name types.NamespacedName, obj client.Object, kind, apiVersion string) *unstructured.Unstructured {
func getUnstructuredObj(t *testing.T, k client.Client, name types.NamespacedName, kind, apiVersion string) *unstructured.Unstructured {
unstructuredObj := &unstructured.Unstructured{}
unstructuredObj.SetKind(kind)
unstructuredObj.SetAPIVersion(apiVersion)
Expand Down

0 comments on commit a9a394b

Please sign in to comment.