@@ -1653,9 +1653,10 @@ func TestDrainNode(t *testing.T) {
1653
1653
1654
1654
tracker := remote .NewTestClusterCacheTracker (ctrl .Log , c , remoteClient , fakeScheme , client .ObjectKeyFromObject (testCluster ))
1655
1655
r := & Reconciler {
1656
- Client : c ,
1657
- Tracker : tracker ,
1658
- drainCache : drain .NewCache (),
1656
+ Client : c ,
1657
+ Tracker : tracker ,
1658
+ drainCache : drain .NewCache (),
1659
+ waitForVolumeDetachCache : drain .NewCache (),
1659
1660
}
1660
1661
1661
1662
res , err := r .drainNode (ctx , testCluster , testMachine , tt .nodeName )
@@ -1752,10 +1753,12 @@ func TestDrainNode_withCaching(t *testing.T) {
1752
1753
1753
1754
tracker := remote .NewTestClusterCacheTracker (ctrl .Log , c , remoteClient , fakeScheme , client .ObjectKeyFromObject (testCluster ))
1754
1755
drainCache := drain .NewCache ()
1756
+ waitForVolumeDetachCache := drain .NewCache ()
1755
1757
r := & Reconciler {
1756
- Client : c ,
1757
- Tracker : tracker ,
1758
- drainCache : drainCache ,
1758
+ Client : c ,
1759
+ Tracker : tracker ,
1760
+ drainCache : drainCache ,
1761
+ waitForVolumeDetachCache : waitForVolumeDetachCache ,
1759
1762
}
1760
1763
1761
1764
// The first reconcile will cordon the Node, evict the one Pod running on the Node and then requeue.
@@ -3049,6 +3052,7 @@ func TestNodeDeletion(t *testing.T) {
3049
3052
Tracker : tracker ,
3050
3053
recorder : record .NewFakeRecorder (10 ),
3051
3054
nodeDeletionRetryTimeout : 10 * time .Millisecond ,
3055
+ waitForVolumeDetachCache : drain .NewCache (),
3052
3056
}
3053
3057
3054
3058
cluster := testCluster .DeepCopy ()
@@ -3173,6 +3177,7 @@ func TestNodeDeletionWithoutNodeRefFallback(t *testing.T) {
3173
3177
Tracker : tracker ,
3174
3178
recorder : record .NewFakeRecorder (10 ),
3175
3179
nodeDeletionRetryTimeout : 10 * time .Millisecond ,
3180
+ waitForVolumeDetachCache : drain .NewCache (),
3176
3181
}
3177
3182
3178
3183
cluster := testCluster .DeepCopy ()
0 commit comments