mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #86891 from gnufied/move-publish-unpublish-check
Move publish and unpublish counting up in test
This commit is contained in:
commit
af202d207f
@ -784,6 +784,13 @@ func checkPodLogs(cs clientset.Interface, namespace, driverPodName, driverContai
|
|||||||
numNodeUnpublishVolume++
|
numNodeUnpublishVolume++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if numNodePublishVolume == 0 {
|
||||||
|
return fmt.Errorf("NodePublish was never called")
|
||||||
|
}
|
||||||
|
|
||||||
|
if numNodeUnpublishVolume == 0 {
|
||||||
|
return fmt.Errorf("NodeUnpublish was never called")
|
||||||
|
}
|
||||||
if expectPodInfo {
|
if expectPodInfo {
|
||||||
if foundAttributes.Len() != len(expectedAttributes) {
|
if foundAttributes.Len() != len(expectedAttributes) {
|
||||||
return fmt.Errorf("number of found volume attributes does not match, expected %d, got %d", len(expectedAttributes), foundAttributes.Len())
|
return fmt.Errorf("number of found volume attributes does not match, expected %d, got %d", len(expectedAttributes), foundAttributes.Len())
|
||||||
@ -793,13 +800,7 @@ func checkPodLogs(cs clientset.Interface, namespace, driverPodName, driverContai
|
|||||||
if foundAttributes.Len() != 0 {
|
if foundAttributes.Len() != 0 {
|
||||||
return fmt.Errorf("some unexpected volume attributes were found: %+v", foundAttributes.List())
|
return fmt.Errorf("some unexpected volume attributes were found: %+v", foundAttributes.List())
|
||||||
}
|
}
|
||||||
if numNodePublishVolume == 0 {
|
|
||||||
return fmt.Errorf("NodePublish was never called")
|
|
||||||
}
|
|
||||||
|
|
||||||
if numNodeUnpublishVolume == 0 {
|
|
||||||
return fmt.Errorf("NodeUnpublish was never called")
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user