// bumpQuota modifies hard spec of quota object with the given value. It returns modified hard spec. func bumpQuota(t *testing.T, rqs kclient.ResourceQuotaInterface, quotaName string, resourceName kapi.ResourceName, value int64) kapi.ResourceList { t.Logf("bump the quota %s to %s=%d", quotaName, resourceName, value) rq, err := rqs.Get(quotaName) if err != nil { t.Fatal(err) } rq.Spec.Hard[resourceName] = *resource.NewQuantity(value, resource.DecimalSI) _, err = rqs.Update(rq) if err != nil { t.Fatal(err) } err = testutil.WaitForResourceQuotaLimitSync( rqs, quotaName, rq.Spec.Hard, time.Second*10) if err != nil { t.Fatal(err) } return rq.Spec.Hard }