@@ -23,6 +23,12 @@ import (
2323// testValueTrue is used as a consistent value string for test assertions.
2424const testValueTrue = "true"
2525
26+ // testValueModified is used as a consistent value string for test assertions.
27+ const testValueModified = "modified"
28+
29+ // testValueAdded is used as a consistent value string for test assertions.
30+ const testValueAdded = "added"
31+
2632func TestConfigImmutability (t * testing.T ) {
2733 cfg := NewConfig ()
2834
@@ -168,8 +174,8 @@ func TestValueOverridesImmutability(t *testing.T) {
168174
169175 // Get and modify returned map
170176 got := cfg .ValueOverrides ()
171- got ["gpuoperator" ]["key" ] = "modified"
172- got ["gpuoperator" ]["new" ] = "added"
177+ got ["gpuoperator" ]["key" ] = testValueModified
178+ got ["gpuoperator" ]["new" ] = testValueAdded
173179
174180 // Verify original config unchanged
175181 fresh := cfg .ValueOverrides ()
@@ -233,8 +239,8 @@ func TestNodeSelectorOptions(t *testing.T) {
233239 cfg := NewConfig (WithSystemNodeSelector (selectors ))
234240
235241 got := cfg .SystemNodeSelector ()
236- got ["key" ] = "modified"
237- got ["new" ] = "added"
242+ got ["key" ] = testValueModified
243+ got ["new" ] = testValueAdded
238244
239245 fresh := cfg .SystemNodeSelector ()
240246 if fresh ["key" ] != "value" {
@@ -651,8 +657,8 @@ func TestWorkloadSelectorOptions(t *testing.T) {
651657 cfg := NewConfig (WithWorkloadSelector (selector ))
652658
653659 got := cfg .WorkloadSelector ()
654- got ["workload-type" ] = "modified"
655- got ["new" ] = "added"
660+ got ["workload-type" ] = testValueModified
661+ got ["new" ] = testValueAdded
656662
657663 fresh := cfg .WorkloadSelector ()
658664 if fresh ["workload-type" ] != "training" {
0 commit comments