test_ccp_install_k8s.py 文件源码

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

项目:fuel-ccp-tests 作者: openstack 项目源码 文件源码
def test_ccp_idempotency_with_etcd_in_container(self, config, 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 that count of changes in the ansible log is more than 0
            3. Re-install k8s with forced etcd in container.
            4. Check that count of changes in the ansible log is 0
        """
        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,
        })
        result = k8s_actions.install_k8s(custom_yaml=kube_settings,
                                         verbose=False)
        changed = self.get_ansible_changes_count(result.stdout_str)
        assert changed != 0, "No changes during k8s install!"
        result = k8s_actions.install_k8s(custom_yaml=kube_settings,
                                         verbose=False)
        changed = self.get_ansible_changes_count(result.stdout_str)
        assert changed == 0, (
            "Should be no changes during the second install "
            "of k8s while there are '{0}' changes!".format(changed))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号