Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def test_to_verify_pod_count_in_default_namespace(k8s_client):
podcount = len(k8s_client.list_namespaced_pod(namespace='default').items)
print(podcount)
assert(podcount > 0)
def test_to_verify_service_count_in_default_namespace(k8s_client):
svccount = len(k8s_client.list_namespaced_service(namespace='default').items)
print(svccount)
assert(svccount > 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment