• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

in-toto / in-toto / 1049 / 2
100%
develop: 100%

Build:
Build:
LAST BUILD BRANCH: dependabot/pip/securesystemslib-cryptopynacl--0.19.0
DEFAULT BRANCH: develop
Ran 11 Mar 2019 04:33PM UTC
Files 32
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Mar 2019 04:31PM UTC coverage: 99.947% (-0.001%) from 99.948%
TOXENV=py35

Pull #262

travis-ci

web-flow
Major rewrite of artifact rule verification

This commit includes several changes to `verify_item_rules` and
the from there called `verify_*_rule` functions (plus corresponding
tests):

- Harmonization of artifact queue modification

Before, `verify_item_rules` used a material queue, a product queue
and an artifact queue to keep track of the artifacts, consumed in
the course of verifying all rules (of a type of an item).  These
queues were modified in different places (in different functions
passed to by reference) and then re-assigned to each other,
sometimes as copy, sometimes as reference, which led to unexpected
states of queues.

This commit removes the materials and products queue (the generic
artifacts queue is enough for keeping track of consumed artifacts).

It further focuses all artifact queue updates in a single place in
`verify_item_rules` and changes the `verify_*_rule` functions to
return the consumed artifacts instead of the updated queue, which
also aligns with the pseudo code in the specification. This change
should make the rule processing a lot more transparent to the
reader.

- Additional code simplifications
This commit also makes better use of set operations in
`verify_*_rule` functions and removes clutter like
  - redundant rule unpacking code
  - unnecessary `if/else`s related to "materials" and "products"
  - unnecessarily long variable names
    the `source_` prefix only makes sense in the scope of the match
    rule, where there is also a destination.
The commit also updates and simplifies a lot of related code
comments and docstrings.

- Full adoption of in-toto/in-toto#204
Remove raised exceptions in `verify_match_rule` and
`verify_delete_rule`, where they should just not consume the
corresponding artifacts.

- Rethink tests
Some of them were still tailored to pre-#204 logic. This commit
makes them more meaningful (and table driven).

- Adopt queue traceback
There is only one queue now.
Pull Request #262: Major rewrite of artifact rule verification

587 of 588 branches covered (99.83%)

1899 of 1900 relevant lines covered (99.95%)

1.0 hits per line

Source Files on job 1049.2 (TOXENV=py35)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 932
  • Travis Job 1049.2
  • 943bac0e on github
  • Prev Job for TOXENV=py35 on rewrite-rule-verification (#1048.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc