test_ccp_install_k8s.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:fuel-ccp-tests 作者: openstack 项目源码 文件源码
def test_k8s_installed_with_etcd_in_container(self, underlay, k8s_actions):
        """Test for deploying an k8s environment and check it

        pytest.mark: k8s_installed_with_etcd_in_container

        Scenario:
            1. Install k8s with forced etcd in container.
            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.
        """
        kube_settings = dict()
        kube_settings.update(self.kube_settings)
        kube_settings.update({
            'etcd_deployment_type': 'docker',
            'kube_network_plugin': 'calico',
            'etcd_image_repo': settings.ETCD_IMAGE_REPO,
            'etcd_image_tag': settings.ETCD_IMAGE_TAG,
        })
        required_images = list(self.base_images)
        required_images.append(kube_settings['etcd_image_repo'])

        k8s_actions.install_k8s(custom_yaml=kube_settings)
        k8sclient = k8s_actions.api

        self.check_number_kube_nodes(underlay, k8sclient)
        self.check_list_required_images(underlay,
                                        required_images=required_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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号