mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
Trying to create a pod using a resourcequota whose status has not been populated will result in api admission rejecting it with a 403 Forbidden. The pod resize tests do not wait/check to make sure the resourcequota status is populated before trying to use the quota when creating a pod, so in scenarious where either the test runs too fast, or the resourcequota controller is too slow, the tests will fail. This just makes the test wait up to a minute for the quota status to populate. The status generation timing/logic gets tested separately in test/e2e/apimachinery/resource_quota.go, and it waits a minute, so we wait a minute, but in practice it takes at worst seconds.
WARNING: Do not add tests in this directory
There are two types of end-to-end tests in Kubernetes:
Tests located in ${KUBE_ROOT}/test/e2e/common are shared by both Cluster
and Node E2E test jobs. Tests in ${KUBE_ROOT}/test/e2e_node are exclusively
owned by Node E2E. If you want to add a test, most likely than not, you want
to add the test to one of the two directories mentioned above. If you are
unsure, please check with the OWNER of the directory. This directory currently
contains misplaced and legacy tests; they will be cleaned up in the future.