test_ccp_install_k8s.py 文件源码

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

项目:fuel-ccp-tests 作者: openstack 项目源码 文件源码
def test_ccp_idempotency_with_ready_ssh_keys(self, ssh_keys_dir,
                                                 config, 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 that count of changes in the ansible log is more than 0
            3. Re-install k8s (with prepared ssh keys).
            4. Check that count of changes in the ansible log is 0
        """
        add_var = {
            "WORKSPACE": ssh_keys_dir
        }
        result = k8s_actions.install_k8s(env_var=add_var,
                                         verbose=False)
        changed = self.get_ansible_changes_count(result.stdout_str)
        assert changed != 0, "No changes during k8s install!"
        result = k8s_actions.install_k8s(env_var=add_var,
                                         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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号