@allure.link('https://jira.arenadata.io/browse/ADCM-487')
def test_when_component_has_no_constraint_then_cluster_doesnt_have_issues(sdk_client_fs: ADCMClient):
    with allure.step('Create cluster (component has no constraint)'):
        bundle_path = utils.get_data_dir(__file__, 'cluster_component_hasnt_constraint')
        bundle = sdk_client_fs.upload_from_fs(bundle_path)
        cluster = bundle.cluster_create(name=utils.random_string())
    cluster.service_add()
    with allure.step('Run action: lock cluster'):
        cluster.action(name='lock-cluster').run().try_wait()
    with allure.step('Check if state is always-locked'):
        cluster.reread()
        assert (cluster.state == 'always-locked')
@allure.link('https://jira.arenadata.io/browse/ADCM-487')
def test_when_component_has_no_constraint_then_cluster_doesnt_have_issues(sdk_client_fs: ADCMClient):
    with allure.step('Create cluster (component has no constraint)'):
        bundle_path = utils.get_data_dir(__file__, 'cluster_component_hasnt_constraint')
        bundle = sdk_client_fs.upload_from_fs(bundle_path)
        cluster = bundle.cluster_create(name=utils.random_string())
    cluster.service_add()
    with allure.step('Run action: lock cluster'):
        cluster.action(name='lock-cluster').run().try_wait()
    with allure.step('Check if state is always-locked'):
        cluster.reread()
        assert (cluster.state == 'always-locked')