Skip to content

Commit

Permalink
Fix linting errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Jagpreet Singh Tamber <jagpreetstamber@gmail.com>
  • Loading branch information
jagpreetstamber committed Mar 28, 2024
1 parent f4b850e commit 719af6b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions leader/leader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
crclient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
Expand Down Expand Up @@ -112,8 +111,8 @@ var _ = Describe("Leader election", func() {
},
},
},
Status: v1.PodStatus{
Phase: v1.PodFailed,
Status: corev1.PodStatus{
Phase: corev1.PodFailed,
Reason: "Evicted",
},
},
Expand Down Expand Up @@ -141,7 +140,11 @@ var _ = Describe("Leader election", func() {
Namespace: "testns",
},
}
client.Delete(ctx, cm)

err := client.Delete(ctx, cm)
if err != nil {
return err
}
}
return nil
},
Expand Down Expand Up @@ -183,8 +186,8 @@ var _ = Describe("Leader election", func() {
},
},
},
Status: v1.PodStatus{
Phase: v1.PodFailed,
Status: corev1.PodStatus{
Phase: corev1.PodFailed,
Reason: "Preempting",
},
},
Expand Down Expand Up @@ -212,7 +215,11 @@ var _ = Describe("Leader election", func() {
Namespace: "testns",
},
}
client.Delete(ctx, cm)

err := client.Delete(ctx, cm)
if err != nil {
return err
}
}
return nil
},
Expand Down

0 comments on commit 719af6b

Please sign in to comment.