Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Terraform output unit tests #31

Merged

Conversation

PolonaM
Copy link
Contributor

@PolonaM PolonaM commented Jan 9, 2023

SUMMARY

Added unit tests for terraform_output module.
Bug fixed - in case of TerraformWarning "outputs" variable set to None to avoid undefined variable error.
Minor change - removed "required_one_of" from the module and updated documentation.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

terraform_output.py

@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Merging #31 (696ac2e) into main (00773ac) will increase coverage by 7.14%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   80.00%   87.14%   +7.14%     
==========================================
  Files          11       13       +2     
  Lines         585      700     +115     
  Branches      115      120       +5     
==========================================
+ Hits          468      610     +142     
+ Misses         74       55      -19     
+ Partials       43       35       -8     
Flag Coverage Δ
integration 79.11% <ø> (-0.16%) ⬇️
sanity 33.07% <ø> (-0.07%) ⬇️
units 61.71% <ø> (+20.88%) ⬆️

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

Impacted Files Coverage Δ
...it/plugins/module_utils/test_terraform_commands.py 100.00% <0.00%> (ø)
...ests/unit/plugins/modules/test_terraform_output.py 100.00% <0.00%> (ø)
...loud/terraform/tests/unit/plugins/modules/utils.py 68.75% <0.00%> (+12.50%) ⬆️
...rraform/plugins/module_utils/terraform_commands.py 83.87% <0.00%> (+13.70%) ⬆️
...loud/terraform/plugins/modules/terraform_output.py 100.00% <0.00%> (+20.68%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@PolonaM PolonaM force-pushed the terraform_output_unit_tests branch from 9a22046 to 88107c6 Compare January 9, 2023 10:31
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ build-ansible-collection SUCCESS in 3m 21s
✔️ ansible-test-sanity-docker-devel SUCCESS in 6m 48s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 05s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 6m 49s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 6m 40s
✔️ ansible-test-units-cloud-terraform-python38 SUCCESS in 5m 21s
✔️ ansible-test-changelog SUCCESS in 2m 12s
✔️ ansible-galaxy-importer SUCCESS in 4m 31s

@PolonaM PolonaM requested a review from sstanovnik January 9, 2023 10:53
@PolonaM PolonaM force-pushed the terraform_output_unit_tests branch from 88107c6 to 696ac2e Compare January 10, 2023 11:11
@softwarefactory-project-zuul
Copy link

Build succeeded.

✔️ build-ansible-collection SUCCESS in 3m 14s
✔️ ansible-test-sanity-docker-devel SUCCESS in 6m 31s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 8m 28s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 7m 36s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 6m 57s
✔️ ansible-test-units-cloud-terraform-python38 SUCCESS in 6m 06s
✔️ ansible-test-changelog SUCCESS in 2m 08s
✔️ ansible-galaxy-importer SUCCESS in 4m 31s

Copy link
Contributor

@sstanovnik sstanovnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks tested to me!

@sstanovnik sstanovnik merged commit 270a967 into ansible-collections:main Jan 10, 2023
@sstanovnik sstanovnik deleted the terraform_output_unit_tests branch January 10, 2023 11:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants