Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Review and update Gcloud unit tests #13573

Merged
merged 3 commits into from Jul 5, 2022

Conversation

CarlosRS9
Copy link
Contributor

Related issue
#13389

Description

In #13389 we have reviewed, updated, replaced existing unit tests for our gcloud module while adding new ones to expand code coverage up to 99%. This is the actual coverage using the new unit tests:

---------- coverage: platform linux, python 3.10.4-final-0 -----------
Name                               Stmts   Miss  Cover   Missing
----------------------------------------------------------------
gcloud/buckets/access_logs.py         16      0   100%
gcloud/buckets/bucket.py             128      2    98%   26-27
gcloud/exceptions.py                  23      0   100%
gcloud/gcloud.py                      68      1    99%   111
gcloud/integration.py                 36      1    97%   38
gcloud/pubsub/subscriber.py           60      2    97%   21-22
gcloud/tests/test_bucket.py          225      0   100%
gcloud/tests/test_gcloud.py           35      0   100%
gcloud/tests/test_integration.py      53      0   100%
gcloud/tests/test_subscriber.py       73      0   100%
gcloud/tests/test_tools.py            34      0   100%
gcloud/tools.py                       41      0   100%
----------------------------------------------------------------
TOTAL                                792      6    99%

To achieve this it was necessary to replace existing unit tests and create them from start. However, it has not been possible to create a tools.py auxiliary module for the unit tests due to the problem of the wodle folder not being an installable python package. Once #12874 is addressed, it will be possible to do so, further optimising the design of these unit tests.

The extensive code review has resulted in several optimizations, changes and removal of some parts of the code. Because of that, manual testing was necessary to ensure everything still works as expected.

@CarlosRS9 CarlosRS9 self-assigned this May 24, 2022
@CarlosRS9 CarlosRS9 linked an issue May 24, 2022 that may be closed by this pull request
3 tasks
wodles/gcloud/gcloud.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/data/access_logs.log Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_bucket.py Show resolved Hide resolved
wodles/gcloud/tests/test_gcloud.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_integration.py Show resolved Hide resolved
wodles/gcloud/tests/test_integration.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_integration.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_integration.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_integration.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_subscriber.py Show resolved Hide resolved
wodles/gcloud/tests/test_subscriber.py Outdated Show resolved Hide resolved
wodles/gcloud/tests/test_tools.py Outdated Show resolved Hide resolved
@CarlosRS9 CarlosRS9 force-pushed the feature/13389-gcloud-unit-tests branch 2 times, most recently from a7c8133 to b40dcc2 Compare June 1, 2022 12:02
@CarlosRS9 CarlosRS9 force-pushed the feature/13389-gcloud-unit-tests branch from b40dcc2 to bed784b Compare June 9, 2022 09:36
@CarlosRS9 CarlosRS9 force-pushed the feature/13389-gcloud-unit-tests branch from bed784b to 6e1aca7 Compare June 20, 2022 09:12
Copy link
Contributor

@mcarmona99 mcarmona99 left a comment

Choose a reason for hiding this comment

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

LGTM

@davidjiglesias davidjiglesias merged commit df95edf into master Jul 5, 2022
@davidjiglesias davidjiglesias deleted the feature/13389-gcloud-unit-tests branch July 5, 2022 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review and update Gcloud unit tests
3 participants