Merge pull request #86397 from gnufied/fix-comparison-of-node-publish-unpublish

Expect NodeUnpublish calls when NodePublish is called
This commit is contained in:
Kubernetes Prow Robot 2019-12-20 09:09:32 -08:00 committed by GitHub
commit 449fe0b1ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}