podUnknown is marked as Obsolete
This commit is contained in:
@@ -91,7 +91,8 @@ func (cc *ConformanceContainer) IsReady() (bool, error) {
|
||||
func (cc *ConformanceContainer) GetPhase() (v1.PodPhase, error) {
|
||||
pod, err := cc.PodClient.Get(context.TODO(), cc.podName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return v1.PodUnknown, err
|
||||
// it doesn't matter what phase to return as error would not be nil
|
||||
return v1.PodSucceeded, err
|
||||
}
|
||||
return pod.Status.Phase, nil
|
||||
}
|
||||
|
||||
@@ -605,8 +605,7 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
|
||||
defer podsLock.Unlock()
|
||||
|
||||
for _, pod := range podsList.Items {
|
||||
switch pod.Status.Phase {
|
||||
case v1.PodSucceeded:
|
||||
if pod.Status.Phase == v1.PodSucceeded {
|
||||
// Delete pod and its PVCs
|
||||
if err := deletePodAndPVCs(config, &pod); err != nil {
|
||||
return false, err
|
||||
@@ -614,9 +613,6 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
|
||||
delete(pods, pod.Name)
|
||||
numFinished++
|
||||
framework.Logf("%v/%v pods finished", numFinished, totalPods)
|
||||
case v1.PodUnknown:
|
||||
return false, fmt.Errorf("pod %v is in %v phase", pod.Name, pod.Status.Phase)
|
||||
case v1.PodFailed:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user