fix(controller): update workload test to use current label name
The workload reconciler was refactored to use the label workloads.cozystack.io/monitor but the test still used the old workloadmonitor.cozystack.io/name label, causing the reconciler to delete the workload instead of keeping it. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
parent
cecc5861af
commit
9eb13fdafe
1 changed files with 2 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ func TestWorkloadReconciler_DeletesOnMissingMonitor(t *testing.T) {
|
|||
Name: "pod-foo",
|
||||
Namespace: "default",
|
||||
Labels: map[string]string{
|
||||
"workloadmonitor.cozystack.io/name": "missing-monitor",
|
||||
"workloads.cozystack.io/monitor": "missing-monitor",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ func TestWorkloadReconciler_KeepsWhenAllExist(t *testing.T) {
|
|||
Name: "pod-foo",
|
||||
Namespace: "default",
|
||||
Labels: map[string]string{
|
||||
"workloadmonitor.cozystack.io/name": "mon",
|
||||
"workloads.cozystack.io/monitor": "mon",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue