Skip to content

Commit

Permalink
[YUNIKORN-2973] Adding GinkgoLinter Checks and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rrajesh-cloudera committed Nov 27, 2024
1 parent f138d3e commit 8b118a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/e2e/admission_controller/admission_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ var _ = ginkgo.Describe("AdmissionController", func() {
rs.Status.ReadyReplicas,
rs.Status.AvailableReplicas)
}
gomega.Ω(len(replicaSetList.Items)).To(gomega.HaveLen(2))
gomega.Ω(replicaSetList.Items).To(gomega.HaveLen(2))
})

ginkgo.AfterEach(func() {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/basic_scheduling/basic_scheduling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ var _ = ginkgo.Describe("", func() {

ginkgo.It("Verify_Pod_Alloc_Props", func() {
ginkgo.By("Verify the pod allocation properties")
gomega.Ω(appsInfo.Allocations).NotTo(gomega.BeNil())
gomega.Ω(len(appsInfo.Allocations)).NotTo(gomega.BeEmpty())
gomega.Ω(appsInfo.Allocations).NotTo(gomega.BeEmpty())
allocation := appsInfo.Allocations[0]
gomega.Ω(allocation).NotTo(gomega.BeNil())
gomega.Ω(allocation.AllocationKey).NotTo(gomega.BeNil())
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/recovery_and_restart/recovery_and_restart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ var _ = ginkgo.Describe("", func() {
gomega.Ω(appsInfo).NotTo(gomega.BeNil())
ginkgo.By("Verify the pod allocation properties")
gomega.Ω(appsInfo).NotTo(gomega.BeNil())
gomega.Ω(len(appsInfo.Allocations)).NotTo(gomega.BeEmpty())
gomega.Ω(appsInfo.Allocations).NotTo(gomega.BeNil())
allocations := appsInfo.Allocations[0]
gomega.Ω(allocations).NotTo(gomega.BeNil())
gomega.Ω(allocations.AllocationKey).NotTo(gomega.BeNil())
Expand All @@ -149,7 +149,7 @@ var _ = ginkgo.Describe("", func() {
core := sleepRespPod.Spec.Containers[0].Resources.Requests.Cpu().MilliValue()
mem := sleepRespPod.Spec.Containers[0].Resources.Requests.Memory().Value()
resMap := allocations.ResourcePerAlloc
gomega.Ω(len(resMap)).NotTo(gomega.BeEmpty())
gomega.Ω(resMap).NotTo(gomega.BeEmpty())
gomega.Ω(resMap["memory"]).To(gomega.Equal(mem))
gomega.Ω(resMap["vcore"]).To(gomega.Equal(core))
})
Expand Down

0 comments on commit 8b118a7

Please sign in to comment.