mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
feat: add logs to volume binding test
This commit is contained in:
parent
3030a9d927
commit
0d7636a92f
@ -430,6 +430,7 @@ func testVolumeBindingStress(t *testing.T, schedulerResyncPeriod time.Duration,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
klog.Infof("Start creating PVs and PVCs")
|
||||||
// Create enough PVs and PVCs for all the pods
|
// Create enough PVs and PVCs for all the pods
|
||||||
pvs := []*v1.PersistentVolume{}
|
pvs := []*v1.PersistentVolume{}
|
||||||
pvcs := []*v1.PersistentVolumeClaim{}
|
pvcs := []*v1.PersistentVolumeClaim{}
|
||||||
@ -465,6 +466,7 @@ func testVolumeBindingStress(t *testing.T, schedulerResyncPeriod time.Duration,
|
|||||||
pvcs = append(pvcs, pvc)
|
pvcs = append(pvcs, pvc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
klog.Infof("Start creating Pods")
|
||||||
pods := []*v1.Pod{}
|
pods := []*v1.Pod{}
|
||||||
for i := 0; i < podLimit; i++ {
|
for i := 0; i < podLimit; i++ {
|
||||||
// Generate string of all the PVCs for the pod
|
// Generate string of all the PVCs for the pod
|
||||||
@ -480,6 +482,7 @@ func testVolumeBindingStress(t *testing.T, schedulerResyncPeriod time.Duration,
|
|||||||
pods = append(pods, pod)
|
pods = append(pods, pod)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
klog.Infof("Start validating pod scheduled")
|
||||||
// Validate Pods scheduled
|
// Validate Pods scheduled
|
||||||
for _, pod := range pods {
|
for _, pod := range pods {
|
||||||
// Use increased timeout for stress test because there is a higher chance of
|
// Use increased timeout for stress test because there is a higher chance of
|
||||||
@ -489,10 +492,12 @@ func testVolumeBindingStress(t *testing.T, schedulerResyncPeriod time.Duration,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
klog.Infof("Start validating PVCs scheduled")
|
||||||
// Validate PVC/PV binding
|
// Validate PVC/PV binding
|
||||||
for _, pvc := range pvcs {
|
for _, pvc := range pvcs {
|
||||||
validatePVCPhase(t, config.client, pvc.Name, config.ns, v1.ClaimBound, dynamic)
|
validatePVCPhase(t, config.client, pvc.Name, config.ns, v1.ClaimBound, dynamic)
|
||||||
}
|
}
|
||||||
|
klog.Infof("Start validating PVs scheduled")
|
||||||
for _, pv := range pvs {
|
for _, pv := range pvs {
|
||||||
validatePVPhase(t, config.client, pv.Name, v1.VolumeBound)
|
validatePVPhase(t, config.client, pv.Name, v1.VolumeBound)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user