fixed using reference to loop iterator

This commit is contained in:
Shivanshu Raj Shrivastava 2021-10-04 21:49:58 +05:30
parent 0ac956ff2b
commit d9b21cd1de
No known key found for this signature in database
GPG Key ID: F4EDF2ED69728499
2 changed files with 2 additions and 0 deletions

View File

@ -1250,6 +1250,7 @@ func getPoolNodes(f *framework.Framework, poolName string) []*v1.Node {
framework.ExpectNoErrorWithOffset(0, err)
for _, node := range nodeList.Items {
if node.Labels[gkeNodepoolNameKey] == poolName {
node := node
nodes = append(nodes, &node)
}
}

View File

@ -968,6 +968,7 @@ func waitForProvisionedVolumesDeleted(c clientset.Interface, scName string) ([]*
}
for _, pv := range allPVs.Items {
if pv.Spec.StorageClassName == scName {
pv := pv
remainingPVs = append(remainingPVs, &pv)
}
}