用于存储对测试结果的弃权的引擎。

waiverdb的Python项目详细描述


放弃RDB

logo of WaiverDB

什么是弃权

弃权是 ResultsDB,用于记录弃权 对照测试结果。

快速开发设置

安装依赖项:

$ sudo dnf builddep waiverdb.spec

使用waiverdb数据库在本地计算机上配置postgres:

$ sudo dnf install postgresql-server
$ sudo postgresql-setup --initdb
$ sudo systemctl enable --now postgresql
$ sudo -u postgres createuser --superuser $USER
$ createdb waiverdb

创建本地配置文件:

$ cp conf/settings.py.example conf/settings.py

填充数据库:

$ PYTHONPATH=. DEV=true python3 waiverdb/manage.py db upgrade

运行服务器:

$ PYTHONPATH=. DEV=true python3 waiverdb/manage.py run -h localhost -p 5004 --debugger

服务器现在在http://localhost:5004运行,api调用可以发送到 http://localhost:5004/api/v1.0。所有数据都存储在waiverdbpostgres中 本地计算机上的数据库。您可以验证服务器是否正常运行 通过访问http://localhost:5004/api/v1.0/about

调整配置

您可以通过将conf/settings.py.example复制到 conf/settings.py并根据需要调整值。它覆盖默认值 waiverdb/config.py中的值。

运行测试套件

您可以使用以下命令运行此测试套件:

$ py.test-3 tests/

测试套件将删除并重新创建一个名为 waiverdb_test。默认情况下,它希望超级用户可以在 本地机器。

要测试所有受支持的python版本,可以使用tox::

$ sudo dnf install python3-tox
$ tox

生成文档

您可以使用以下命令在本地查看文档:

$ cd docs
$ make html
$ firefox _build/html/index.html

查看已发布的fedmsg

通过执行以下操作,可以查看创建新豁免时发布的FEDMSG:

$ fedmsg-relay --config-filename fedmsg.d/config.py &
$ fedmsg-tail --config fedmsg.d/config.py --no-validate --really-pretty

弃权声明

弃权数据库有一个命令行客户端接口,用于创建针对测试的新弃权 结果。示例配置安装为/usr/share/doc/waiverdb/client.conf.example。 复制到/etc/waiverdb/client.conf并在那里编辑。或者您可以使用--config-file 指定一个。

Usage: waiverdb-cli [OPTIONS]

  Creates new waivers against test results.

  Examples:

      waiverdb-cli -r 47 -r 48 -p "fedora-28" -c "This is fine"
or

      waiverdb-cli -t dist.rpmdeplint -s '{"item": "qclib-1.3.1-3.fc28", "type": "koji_build"}' -p "fedora-28" -c "This is expected for non-x86 packages"


Options:
  -C, --config-file PATH           Specify a config file to use.
  -r, --result-id INTEGER          Specify one or more results to be waived.
  -s, --subject TEXT               Deprecated. Use --subject-identifier and
                                   --subject-type instead. Subject for a result to waive.
  -i, --subject-identifier TEXT    Subject identifier for a result to waive.
  -T, --subject-type TEXT          Subject type for a result to waive.
  -t, --testcase TEXT              Specify a testcase for the subject.
  -p, --product-version TEXT       Specify one of PDC's product version
                                   identifiers.
  --waived / --no-waived           Whether or not the result is waived.
  -c, --comment TEXT               A comment explaining why the result is waived.
  -h, --help                       Show this message and exit.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
计算闰年的Java代码   java差分算法错误地交换36和35   java新创建的图形对象仅在调整帧大小后显示   删除类文件后在java中获取ClassNotFoundException时发生异常   递归复制链表(Java)   java为什么Eclipse生成的toString只包含非静态字段?   java无法在eclipse中将J2EE项目发布到tomcat   sql server中无锁的java主/工作程序   java在静态工厂方法中使用重写方法创建实例时,如何访问封闭类中的私有字段?   在本地块内初始化的java引用类型在本地块外未初始化   在Java中比较两个ArrayList的循环   java错误:开始标记LinearLayout无效   java强制IntelliJ使用Maven工件,即使生成工件的模块在项目中