def test_check_host_bundle_versions_as_a_string(sdk_client_fs: ADCMClient): """Test upload hostprovider bundle with versions""" stack_dir = utils.get_data_dir(__file__, "host_version_as_a_string") sdk_client_fs.upload_from_fs(stack_dir) with allure.step("Check host versions"): prototype = sdk_client_fs.host_prototype() assert isinstance(prototype.version, str)
def test_validate_host_prototype(self, sdk_client_fs: ADCMClient): """ Validate provider object schema """ host_prototype = sdk_client_fs.host_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("Match prototype with schema"): assert validate(host_prototype, schema) is None
def test_host_proto_wo_actions(sdk_client_fs: ADCMClient): """Test validate host proto without action""" stack_dir = utils.get_data_dir(__file__, "host_proto_wo_action") sdk_client_fs.upload_from_fs(stack_dir) with allure.step("Get host without actions"): host_prototype = sdk_client_fs.host_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 host prototype"): assert validate(host_prototype, schema) is None