latchset / custodia

An API to manage secrets storage and retrieval
GNU General Public License v3.0
85 stars 27 forks source link

Functional tests for SimpleCredsAuth plugin #229

Closed celestian closed 7 years ago

celestian commented 7 years ago

This parametrized test try all possibilities of SimpleCredsAuth plugin configuration and try access Custodia server.

codecov-io commented 7 years ago

Codecov Report

Merging #229 into master will increase coverage by 0.28%. The diff coverage is 83.2%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #229      +/-   ##
==========================================
+ Coverage   72.74%   73.03%   +0.28%     
==========================================
  Files          41       42       +1     
  Lines        4433     4535     +102     
  Branches      449      472      +23     
==========================================
+ Hits         3225     3312      +87     
- Misses       1052     1056       +4     
- Partials      156      167      +11
Impacted Files Coverage Δ
tests/functional/test_plugin_auth.py 100% <100%> (ø)
tests/functional/base.py 84.91% <81.66%> (-1.45%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a76747b...17429c0. Read the comment docs.

celestian commented 7 years ago

In my opinion it could be useful to improve documentation of this plugin a bit. If we have configuration as:

[auth:creds]
handler = SimpleCredsAuth
uid = <correct_id>
gid = <incorrect_id>

the access is granted (proved by test). It could be little confusing that uid and gid are in OR relation.