def test_when_cluster_has_issue_than_upgrade_locked(sdk_client_fs: ADCMClient):
    with allure.step('Create cluster and upload new one bundle'):
        old_bundle_path = utils.get_data_dir(__file__, 'cluster')
        new_bundle_path = utils.get_data_dir(__file__, 'upgrade', 'cluster')
        old_bundle = sdk_client_fs.upload_from_fs(old_bundle_path)
        cluster = old_bundle.cluster_create(name=utils.random_string())
        sdk_client_fs.upload_from_fs(new_bundle_path)
    with allure.step('Upgrade cluster'):
        with pytest.raises(coreapi.exceptions.ErrorMessage) as e:
            cluster.upgrade().do()
    with allure.step('Check if cluster has issues'):
        UPGRADE_ERROR.equal(e, 'cluster ', ' has issue: ')
def test_when_cluster_has_issue_than_upgrade_locked(sdk_client_fs: ADCMClient):
    with allure.step('Create cluster and upload new one bundle'):
        old_bundle_path = utils.get_data_dir(__file__, 'cluster')
        new_bundle_path = utils.get_data_dir(__file__, 'upgrade', 'cluster')
        old_bundle = sdk_client_fs.upload_from_fs(old_bundle_path)
        cluster = old_bundle.cluster_create(name=utils.random_string())
        sdk_client_fs.upload_from_fs(new_bundle_path)
    with allure.step('Upgrade cluster'):
        with pytest.raises(coreapi.exceptions.ErrorMessage) as e:
            cluster.upgrade().do()
    with allure.step('Check if cluster has issues'):
        UPGRADE_ERROR.equal(e, 'cluster ', ' has issue: ')