Created
June 23, 2018 16:10
-
-
Save samirbehara-zz/485c60ed742ce01227dfc914fdabbc08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_kubernetes_node_status_is_ready(k8s_client): | |
nodelist = k8s_client.list_node() | |
# Iterate through all the nodes and verify that they are Active | |
for item in nodelist.items: | |
node = k8s_client.read_node_status(name=item.metadata.name) | |
print("%s\t" % item.metadata.name) | |
assert(node.status.conditions[0].status == "False" ) # Verify if kubelet is OutOfDisk | |
assert(node.status.conditions[1].status == "False" ) # Verify if kubelet has MemoryPressure | |
assert(node.status.conditions[2].status == "False" ) # Verify if kubelet has DiskPressure | |
assert(node.status.conditions[3].type == "Ready" ) # Verify kubelet is posting ready status | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment