Add checking error for disruption e2e test

This commit is contained in:
toyoda 2020-04-21 09:52:23 +09:00
parent d6f44b0ea9
commit 47e4f51da2

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 {
pdbStatusResource := policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets")
unstruct, err := dc.Resource(pdbStatusResource).Namespace(ns).Get(context.TODO(), name, metav1.GetOptions{}, "status")
framework.ExpectNoError(err)
pdb, err := unstructuredToPDB(unstruct)
framework.ExpectNoError(err, "Getting the status of the pdb %s in namespace %s", name, ns)
return pdb