Skip to content

Commit 86c9103

Browse files
committed
make true a const to satisfy linter
1 parent a0e563f commit 86c9103

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

operator/internal/controller/cluster_state_v2_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ import (
3030
kptr "k8s.io/utils/ptr"
3131
)
3232

33+
const (
34+
annotationTrueValue = "true"
35+
)
36+
3337
var _ = Describe("cluster state v2 tests", func() {
3438

3539
It("should check taint toleration", func() {
@@ -412,7 +416,7 @@ var _ = Describe("CleanupRemovedNodes", func() {
412416

413417
It("should update status to paused when skyhook is paused and status is not already paused", func() {
414418
// Set up the skyhook as paused
415-
mockSkyhook.Annotations[v1alpha1.METADATA_PREFIX+"/pause"] = "true"
419+
mockSkyhook.Annotations[v1alpha1.METADATA_PREFIX+"/pause"] = annotationTrueValue
416420

417421
// Set up mock expectations
418422
mockSkyhookNodes.EXPECT().IsPaused().Return(true)
@@ -429,7 +433,7 @@ var _ = Describe("CleanupRemovedNodes", func() {
429433

430434
It("should not change status when skyhook is paused but status is already paused", func() {
431435
// Set up the skyhook as paused with paused status
432-
mockSkyhook.Annotations[v1alpha1.METADATA_PREFIX+"/pause"] = "true"
436+
mockSkyhook.Annotations[v1alpha1.METADATA_PREFIX+"/pause"] = annotationTrueValue
433437

434438
// Set up mock expectations
435439
mockSkyhookNodes.EXPECT().IsPaused().Return(true)
@@ -630,7 +634,7 @@ var _ = Describe("CleanupRemovedNodes", func() {
630634

631635
It("should set status to disabled when skyhook is disabled", func() {
632636
// Set up the skyhook as disabled
633-
testSkyhook.Annotations["skyhook.nvidia.com/disable"] = "true"
637+
testSkyhook.Annotations["skyhook.nvidia.com/disable"] = annotationTrueValue
634638

635639
skyhookNode, err := wrapper.NewSkyhookNode(testNode, testSkyhook)
636640
Expect(err).NotTo(HaveOccurred())
@@ -650,7 +654,7 @@ var _ = Describe("CleanupRemovedNodes", func() {
650654

651655
It("should set status to paused when skyhook is paused", func() {
652656
// Set up the skyhook as paused
653-
testSkyhook.Annotations["skyhook.nvidia.com/pause"] = "true"
657+
testSkyhook.Annotations["skyhook.nvidia.com/pause"] = annotationTrueValue
654658

655659
skyhookNode, err := wrapper.NewSkyhookNode(testNode, testSkyhook)
656660
Expect(err).NotTo(HaveOccurred())
@@ -779,7 +783,7 @@ var _ = Describe("CleanupRemovedNodes", func() {
779783

780784
It("should handle multiple nodes correctly when disabled", func() {
781785
// Set up the skyhook as disabled
782-
testSkyhook.Annotations["skyhook.nvidia.com/disable"] = "true"
786+
testSkyhook.Annotations["skyhook.nvidia.com/disable"] = annotationTrueValue
783787

784788
node1 := &corev1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-1"}}
785789
node2 := &corev1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-2"}}

0 commit comments

Comments
 (0)