ansible-collections / community.hashi_vault

Ansible collection for managing and working with HashiCorp Vault.
https://docs.ansible.com/ansible/devel/collections/community/hashi_vault/index.html
GNU General Public License v3.0
81 stars 61 forks source link

add userpass auth tests #192

Closed briantist closed 2 years ago

briantist commented 2 years ago
SUMMARY

Fixes #67

Adds unit and integration tests for the userpass auth method.

Also fixes a regression introduced in #191 where localenv tests don't run coverage.

ISSUE TYPE
COMPONENT NAME

auth_userpass

ADDITIONAL INFORMATION

N/A

codecov[bot] commented 2 years ago

Codecov Report

Merging #192 (2200de6) into main (5117d42) will increase coverage by 0.74%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   91.69%   92.43%   +0.74%     
==========================================
  Files          40       41       +1     
  Lines        1589     1639      +50     
  Branches      122      125       +3     
==========================================
+ Hits         1457     1515      +58     
+ Misses        119      111       -8     
  Partials       13       13              
Flag Coverage Δ
env_docker-default 92.43% <100.00%> (+0.74%) :arrow_up:
integration 76.56% <ø> (+0.97%) :arrow_up:
sanity 37.65% <ø> (ø)
target_ansible-doc 100.00% <ø> (ø)
target_auth_approle 89.47% <ø> (ø)
target_auth_cert 86.36% <ø> (ø)
target_auth_jwt 91.30% <ø> (ø)
target_auth_none 100.00% <ø> (ø)
target_auth_token 71.42% <ø> (ø)
target_auth_userpass 85.71% <ø> (?)
target_connection_options 74.76% <ø> (ø)
target_controller 66.62% <ø> (ø)
target_import 37.65% <ø> (ø)
target_lookup_hashi_vault 81.33% <ø> (ø)
target_lookup_vault_read 90.00% <ø> (ø)
target_module_utils 91.09% <100.00%> (+0.92%) :arrow_up:
target_module_vault_read 92.10% <ø> (ø)
units 89.62% <100.00%> (+0.82%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plugins/module_utils/_auth_method_jwt.py 95.65% <ø> (ø)
.../module_utils/authentication/test_auth_userpass.py 100.00% <100.00%> (ø)
plugins/module_utils/_auth_method_userpass.py 90.47% <0.00%> (+38.09%) :arrow_up:

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 5117d42...2200de6. Read the comment docs.