Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samirbehara-zz/0fa153fee0841404ed626f6cc5f0de1d to your computer and use it in GitHub Desktop.
Save samirbehara-zz/0fa153fee0841404ed626f6cc5f0de1d to your computer and use it in GitHub Desktop.
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