def test_check_cluster_bundle_versions_as_a_string(sdk_client_fs: ADCMClient): stack_dir = utils.get_data_dir(__file__, 'cluster_service_versions_as_a_string') sdk_client_fs.upload_from_fs(stack_dir) with allure.step('Check bundle versions'): prototype = random.choice(sdk_client_fs.service_prototype_list()) assert isinstance(prototype.version, str) is True assert isinstance(prototype.version, str) is True
def test_cluster_bundle_can_be_on_any_level(sdk_client_fs: ADCMClient): """Test upload cluster bundle lower that in directory root""" stack_dir = utils.get_data_dir(__file__, "cluster_bundle_on_any_level") sdk_client_fs.upload_from_fs(stack_dir) with allure.step("Check cluster bundle"): assert sdk_client_fs.service_prototype_list() assert sdk_client_fs.cluster_prototype_list()
def test_get_cluster_service_list(self, sdk_client_fs: ADCMClient, cluster: Cluster): """Test cluster service list""" expected = [] with allure.step("Create a list of services in the cluster"): for prototype in sdk_client_fs.service_prototype_list(bundle_id=cluster.bundle_id): service = cluster.service_add(prototype_id=prototype.id) expected.append(service._data) with allure.step("Get a service list in cluster"): actual = [x._data for x in cluster.service_list()] with allure.step("Check expected and actual value"): assert actual == expected
def test_empty_default_config_value(sdk_client_fs: ADCMClient): """Test upload bundle with empty default config value""" stack_dir = utils.get_data_dir(__file__, "empty_default_config_value") sdk_client_fs.upload_from_fs(stack_dir) with allure.step("Check service prototype list"): assert sdk_client_fs.service_prototype_list() is not None
def test_playbook_path(sdk_client_fs: ADCMClient): """Test upload bundle with action with playbook path""" stack_dir = utils.get_data_dir(__file__, "playbook_path_test") sdk_client_fs.upload_from_fs(stack_dir) with allure.step("Check service prototype list"): assert sdk_client_fs.service_prototype_list() is not None
def test_cluster_bundle_can_be_on_any_level(sdk_client_fs: ADCMClient): stack_dir = utils.get_data_dir(__file__, 'cluster_bundle_on_any_level') sdk_client_fs.upload_from_fs(stack_dir) with allure.step('Check cluster bundle'): assert sdk_client_fs.service_prototype_list() assert sdk_client_fs.cluster_prototype_list()
def test_empty_default_config_value(sdk_client_fs: ADCMClient): stack_dir = utils.get_data_dir(__file__, 'empty_default_config_value') sdk_client_fs.upload_from_fs(stack_dir) with allure.step('Check service prototype list'): assert sdk_client_fs.service_prototype_list() is not None
def test_playbook_path(sdk_client_fs: ADCMClient): stack_dir = utils.get_data_dir(__file__, 'playbook_path_test') sdk_client_fs.upload_from_fs(stack_dir) with allure.step('Check service prototype list'): assert sdk_client_fs.service_prototype_list() is not None