Skip to content

Commit 14299a1

Browse files
scotwellsclaude
andcommitted
fix(lint): use rdTestWorkloadName constant for repeated workload name
Replace literal "test-workload" occurrences with the existing rdTestWorkloadName constant so goconst no longer flags them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent dfb2426 commit 14299a1

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/controller/workload_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
func makeWorkload(generation int64) *computev1alpha.Workload {
2222
return &computev1alpha.Workload{
2323
ObjectMeta: metav1.ObjectMeta{
24-
Name: "test-workload",
24+
Name: rdTestWorkloadName,
2525
Namespace: testDefaultNamespace,
2626
Generation: generation,
2727
},

internal/controller/workloaddeployment_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func TestReconcileInstanceGates_NilSpecController_DoesNotPanic(t *testing.T) {
192192
Spec: computev1alpha.WorkloadDeploymentSpec{
193193
CityCode: cityCode,
194194
PlacementName: testDefaultPlacement,
195-
WorkloadRef: computev1alpha.WorkloadReference{Name: "test-workload"},
195+
WorkloadRef: computev1alpha.WorkloadReference{Name: rdTestWorkloadName},
196196
ScaleSettings: computev1alpha.HorizontalScaleSettings{MinReplicas: 1},
197197
Template: computev1alpha.InstanceTemplateSpec{},
198198
},

internal/controller/workloaddeployment_federator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ func TestWorkloadDeploymentFederator_Finalization(t *testing.T) {
477477
Spec: computev1alpha.WorkloadDeploymentSpec{
478478
CityCode: testCityCodeLAX,
479479
PlacementName: testDefaultPlacement,
480-
WorkloadRef: computev1alpha.WorkloadReference{Name: "test-workload"},
480+
WorkloadRef: computev1alpha.WorkloadReference{Name: rdTestWorkloadName},
481481
ScaleSettings: computev1alpha.HorizontalScaleSettings{MinReplicas: 1},
482482
},
483483
}

0 commit comments

Comments
 (0)