Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
kale-amruta committed Feb 13, 2025
1 parent 48e8243 commit 931f8a3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/controllers/resources/nodes/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,14 @@ func TestSyncBothExist(t *testing.T) {
}

if tC.virtualNodeExists {
node := initialVNode.DeepCopy()
if len(tC.virtualInitialAnnotations) > 0 {
node.Annotations = tC.virtualInitialAnnotations
// Since we pass initialVNode to syncer.Sync, we should
// update the initialVNode to have annnotations as per
// the test case
initialVNode.Annotations = tC.virtualInitialAnnotations
}

initialObjects = append(initialObjects, node)
initialObjects = append(initialObjects, initialVNode)
}

physical.Labels = tC.hostLabel
Expand Down

0 comments on commit 931f8a3

Please sign in to comment.