vapor-ware / kubetest

Kubernetes integration testing in Python via pytest
https://kubetest.readthedocs.io/en/latest/
GNU General Public License v3.0
206 stars 57 forks source link

Wait for pod ready if created by TestClient #209

Open YiannisGkoufas opened 3 years ago

YiannisGkoufas commented 3 years ago

Hi!

Was wondering how I can wait for a pod to be ready if it's created by TestClient:

def test_one(kube: client.TestClient):
    pod = kube.load_pod("./tests/alpine.yaml")
    kube.create(pod)

Is there an alternative to time.sleep and periodically check? Or I should just use a deployment instead?