脚本测试吉诃德moulinettes本地
etna-dulcinea的Python项目详细描述
杜尔西纳
基于吉诃德蓝图手动加载和执行作业的脚本。在
安装
pip install -r requirements.txt
如何使用杜西娜
^{pr2}$Conf文件示例
conf文件可以使用-c
选项给出,它包含有用的元数据,可以在上下文中插入,比如用户的信息。在
{"intra_user":"login_z","intra_password":"superPassSecure","gitlab_token":"superCuteToken"}
蓝图
为了在本地测试moulinette,脚本必须能够获取一些虚拟交付来测试。在
通常,可以通过使用fetch.copy
内置的“本地”获取替换获取步骤来实现:
importquixote.fetch.copyasfetch@quixote.fetcherdeffetch_by_copying():fetch.copy(path_to_the_dummy_delivery_folder)
The dummy delivery folder must contain a directory for each
group_id
specified in the info file, which will act as dummy delivery for the specific job. See the documentation forfetch.copy
.
但是,--override-deliveries
可用于提供一个包含虚拟交付的目录,并询问
Dulcinea将使用给定目录中的数据自动覆盖现有的取数器。
这个解决方案是首选的,因为它在测试简单的蓝图时更容易使用。在
信息文件示例
info文件必须使用-i
选项给出,并且应该包含所有虚拟传递的元数据。在
[
{
"module_id": 1,
"activity_id": 1,
"group_id": 1,
"leader": "login_x"
},
{
"module_id": 1,
"activity_id": 1,
"group_id": 2,
"leader": "login_y"
}
]
The only mandatory value is
group_id
, which must match the directory name inside the dummy delivery folder. If any other value is missing, Dulcinea will use a default value instead.
- 项目
标签: