Addressing review comments related to csi pod stop condition
@@ -240,9 +240,7 @@ func stopDriverCsiPodFailoverTest(t *testing.T) {
// Make sure to stop px on all the non csi nodes expect one
logrus.Infof("Stopping PX on all non CSI pods except one for failover verification")
for nodeName, schedNode := range nodeNameMap {
- if val, ok := isCsiPodNode[nodeName]; ok && val {
- continue
- }
+ if _, ok := isCsiPodNode[nodeName]; !ok {
if nonCsiNodeAlreadyFound && schedNode.IsStorageDriverInstalled {
err = volumeDriver.StopDriver([]node.Node{schedNode}, false, nil)
require.NoError(t, err, "Error stopping driver on node %+v", nodeNameMap[nodeName])
@@ -254,6 +252,7 @@ func stopDriverCsiPodFailoverTest(t *testing.T) {
nonCsiNodeAlreadyFound = true
}
}
+ }
podToFailover := csiPods.Items[0]
nodeName := podToFailover.Spec.NodeName
