Пример #1
0
def test_check_cluster_bundle_versions_as_a_string(sdk_client_fs: ADCMClient):
    """Test upload cluster bundle with versions"""
    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 = sdk_client_fs.service_prototype()
        assert isinstance(prototype.version, str)
Пример #2
0
def test_service_wo_actions(sdk_client_fs: ADCMClient):
    """Test upload service without action"""
    stack_dir = utils.get_data_dir(__file__, "service_wo_action")
    sdk_client_fs.upload_from_fs(stack_dir)
    with allure.step("Get service without actions"):
        service_prototype = sdk_client_fs.service_prototype()._data  # pylint: disable=protected-access
        with open(SCHEMAS + "/stack_list_item_schema.json",
                  encoding='utf_8') as file:
            schema = json.load(file)
    with allure.step("Check service"):
        assert validate(service_prototype, schema) is None