Merge pull request #90321 from k-toyoda-pi/add_error_check_e2e_disruption

Add checking error for disruption e2e test
This commit is contained in:
Kubernetes Prow Robot
2020-06-04 07:05:14 -07:00
committed by GitHub

View File

@@ -607,6 +607,7 @@ func waitForPdbToObserveHealthyPods(cs kubernetes.Interface, ns string, healthyC
func getPDBStatusOrDie(dc dynamic.Interface, ns string, name string) *policyv1beta1.PodDisruptionBudget { func getPDBStatusOrDie(dc dynamic.Interface, ns string, name string) *policyv1beta1.PodDisruptionBudget {
pdbStatusResource := policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets") pdbStatusResource := policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets")
unstruct, err := dc.Resource(pdbStatusResource).Namespace(ns).Get(context.TODO(), name, metav1.GetOptions{}, "status") unstruct, err := dc.Resource(pdbStatusResource).Namespace(ns).Get(context.TODO(), name, metav1.GetOptions{}, "status")
framework.ExpectNoError(err)
pdb, err := unstructuredToPDB(unstruct) pdb, err := unstructuredToPDB(unstruct)
framework.ExpectNoError(err, "Getting the status of the pdb %s in namespace %s", name, ns) framework.ExpectNoError(err, "Getting the status of the pdb %s in namespace %s", name, ns)
return pdb return pdb