mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
Merge pull request #86397 from gnufied/fix-comparison-of-node-publish-unpublish
Expect NodeUnpublish calls when NodePublish is called
This commit is contained in:
commit
449fe0b1ba
@ -793,8 +793,12 @@ func checkPodLogs(cs clientset.Interface, namespace, driverPodName, driverContai
|
||||
if foundAttributes.Len() != 0 {
|
||||
return fmt.Errorf("some unexpected volume attributes were found: %+v", foundAttributes.List())
|
||||
}
|
||||
if numNodePublishVolume != numNodeUnpublishVolume {
|
||||
return fmt.Errorf("number of NodePublishVolume %d != number of NodeUnpublishVolume %d", numNodePublishVolume, numNodeUnpublishVolume)
|
||||
if numNodePublishVolume == 0 {
|
||||
return fmt.Errorf("NodePublish was never called")
|
||||
}
|
||||
|
||||
if numNodeUnpublishVolume == 0 {
|
||||
return fmt.Errorf("NodeUnpublish was never called")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user