def test_k8s_installed_with_ready_ssh_keys(self, ssh_keys_dir,
underlay, k8s_actions):
"""Test for deploying an k8s environment and check it
pytest.mark: k8s_installed_with_ready_ssh_keys
Scenario:
1. Install k8s (with prepared ssh keys).
2. Check number of nodes.
3. Basic check of running containers on nodes.
4. Check requirement base settings.
5. Create nginx pod.
6. Check created pod is reached
7. Delete pod.
"""
add_var = {
"WORKSPACE": ssh_keys_dir
}
k8s_actions.install_k8s(env_var=add_var)
k8sclient = k8s_actions.api
self.check_number_kube_nodes(underlay, k8sclient)
self.check_list_required_images(
underlay, required_images=self.base_images)
self.check_etcd_health(underlay)
nginx = self.get_nginx_spec()
pod = k8s_actions.check_pod_create(body=nginx)
self.check_nginx_pod_is_reached(underlay, pod.status.pod_ip)
k8s_actions.check_pod_delete(pod)
评论列表
文章目录