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

CP-6005 Ensure vSDK test coverage #403

Merged
merged 1 commit into from
Oct 6, 2021
Merged

Conversation

mrburke
Copy link
Contributor

@mrburke mrburke commented Oct 4, 2021

Context:

Preparing for the upcoming move to Python 3.8, we need to ensure we have solid test coverage. Fortunately the team has done a great job so far and the only package with a coverage rate < 95% was common.

Name Statements Missed Coverage
setup.py 7 7 0%
dlpx/virtualization/common/_common_classes.py 145 24 83%
dlpx/virtualization/common/exceptions.py 51 27 47%
dlpx/init.py 1 0 100%
dlpx/virtualization/init.py 1 0 100%
dlpx/virtualization/common/init.py 1 0 100%
dlpx/virtualization/common/test_common_classes.py 114 0 100%
TOTAL 320 58 82%

Problem:

The issue mainly lied in dlpx.virtualization.common.exceptions, which had a 47% coverage rate.

Solution:

Added a number of tests targeting the missed areas in common.exceptions.

Testing

New common package coverage:

Name                                                                Stmts   Miss  Cover  
-------------------------------------------------------------------------------------------------
setup.py                                                                7      7     0%   
src/main/python/dlpx/virtualization/common/_common_classes.py         144     12    92% 
src/main/python/dlpx/virtualization/common/exceptions.py               54      4    93%  
src/test/python/dlpx/__init__.py                                        1      0   100%
src/test/python/dlpx/virtualization/__init__.py                         1      0   100%
src/test/python/dlpx/virtualization/common/__init__.py                  1      0   100%
src/test/python/dlpx/virtualization/common/test_common_classes.py     158      0   100%
-------------------------------------------------------------------------------------------------
TOTAL                                                                 366     23    94%

We're now at 94% coverage for this package.

(py2env) ➜  virtualization-sdk git:(cp-6005) ✗ py2env/bin/pytest common/src/test/python/ 
========================================================================================================== test session starts ===========================================================================================================
platform darwin -- Python 2.7.15, pytest-4.6.11, py-1.10.0, pluggy-0.13.1
rootdir: /Users/zachary.burke/virtualization-sdk/common
collected 37 items                                                                                                                                                                                                                       

common/src/test/python/dlpx/virtualization/common/test_common_classes.py .....................................                                                                                                                     [100%]

======================================================================================================= 37 passed in 0.26 seconds ========================================================================================================

@mrburke mrburke merged commit f0833f0 into delphix:develop Oct 6, 2021
mrburke pushed a commit that referenced this pull request Jan 12, 2022
* DOC-1074 Document password vault support for VSDK plugins (#347)

* Correct Typo in Example, it should be UNIX not WINDOWS (#360)

* Add documentation for gRPC message and memory limits #390 (#391)

* Fix version number in doc header (#358) (#397)

* Update Delphix Engine version required to 6.0.7.0. (#386) (#398)

* Update SDK Docs deployment to use a deploy_key (#392) (#399)

* CP-6005 Ensure vSDK test coverage (#403)

* CP-6006 Futurize vSDK - Stage 1 (#404)

* Add support for virtualCleanup decorator (#400) (#405)

Co-authored-by: Kurt Hutchison <[email protected]>

* Fixes #401 Networking capabilities should be documented (#402)

Fixes #401 Networking capabilities should be documented

* CP-6009 Add to_str and to_byte helpers (#407)

* CP-6621 bump sdk version to 4.0.0 (#409)

* CP-6694 Update docs for SDK 4.0.0 (#410)

* CP-7022 vSDK 4.0.0 release tasks

* Update VirtualDelete flow diagram to include the virtual.cleanup call. (#414)

Co-authored-by: Kurt Hutchison <[email protected]>

* Update documentation with new gRPC message limits (#415)

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>
mrburke pushed a commit to mrburke/virtualization-sdk that referenced this pull request Jan 13, 2022
* DOC-1074 Document password vault support for VSDK plugins (delphix#347)

* Correct Typo in Example, it should be UNIX not WINDOWS (delphix#360)

* Add documentation for gRPC message and memory limits delphix#390 (delphix#391)

* Fix version number in doc header (delphix#358) (delphix#397)

* Update Delphix Engine version required to 6.0.7.0. (delphix#386) (delphix#398)

* Update SDK Docs deployment to use a deploy_key (delphix#392) (delphix#399)

* CP-6005 Ensure vSDK test coverage (delphix#403)

* CP-6006 Futurize vSDK - Stage 1 (delphix#404)

* Add support for virtualCleanup decorator (delphix#400) (delphix#405)

Co-authored-by: Kurt Hutchison <[email protected]>

* Fixes delphix#401 Networking capabilities should be documented (delphix#402)

Fixes delphix#401 Networking capabilities should be documented

* CP-6009 Add to_str and to_byte helpers (delphix#407)

* CP-6621 bump sdk version to 4.0.0 (delphix#409)

* CP-6694 Update docs for SDK 4.0.0 (delphix#410)

* CP-7022 vSDK 4.0.0 release tasks

* Update VirtualDelete flow diagram to include the virtual.cleanup call. (delphix#414)

Co-authored-by: Kurt Hutchison <[email protected]>

* Update documentation with new gRPC message limits (delphix#415)

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>
mrburke pushed a commit that referenced this pull request Jan 13, 2022
* DOC-1074 Document password vault support for VSDK plugins (#347)

* Correct Typo in Example, it should be UNIX not WINDOWS (#360)

* Add documentation for gRPC message and memory limits #390 (#391)

* Fix version number in doc header (#358) (#397)

* Update Delphix Engine version required to 6.0.7.0. (#386) (#398)

* Update SDK Docs deployment to use a deploy_key (#392) (#399)

* CP-6005 Ensure vSDK test coverage (#403)

* CP-6006 Futurize vSDK - Stage 1 (#404)

* Add support for virtualCleanup decorator (#400) (#405)

Co-authored-by: Kurt Hutchison <[email protected]>

* Fixes #401 Networking capabilities should be documented (#402)

Fixes #401 Networking capabilities should be documented

* CP-6009 Add to_str and to_byte helpers (#407)

* CP-6621 bump sdk version to 4.0.0 (#409)

* CP-6694 Update docs for SDK 4.0.0 (#410)

* CP-7022 vSDK 4.0.0 release tasks

* Update VirtualDelete flow diagram to include the virtual.cleanup call. (#414)

Co-authored-by: Kurt Hutchison <[email protected]>

* Update documentation with new gRPC message limits (#415)

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>
mrburke pushed a commit that referenced this pull request Jan 20, 2022
* CP-7022 vSDK 4.0.0 release tasks (#416)

* Bumping sdk to 4.0.2 and dvp-api to 1.6.3 due to bad upload of dvp-api 1.6.1 to pypi (#419)

* Release (#418)

* DOC-1074 Document password vault support for VSDK plugins (#347)

* Correct Typo in Example, it should be UNIX not WINDOWS (#360)

* Add documentation for gRPC message and memory limits #390 (#391)

* Fix version number in doc header (#358) (#397)

* Update Delphix Engine version required to 6.0.7.0. (#386) (#398)

* Update SDK Docs deployment to use a deploy_key (#392) (#399)

* CP-6005 Ensure vSDK test coverage (#403)

* CP-6006 Futurize vSDK - Stage 1 (#404)

* Add support for virtualCleanup decorator (#400) (#405)

Co-authored-by: Kurt Hutchison <[email protected]>

* Fixes #401 Networking capabilities should be documented (#402)

Fixes #401 Networking capabilities should be documented

* CP-6009 Add to_str and to_byte helpers (#407)

* CP-6621 bump sdk version to 4.0.0 (#409)

* CP-6694 Update docs for SDK 4.0.0 (#410)

* CP-7022 vSDK 4.0.0 release tasks

* Update VirtualDelete flow diagram to include the virtual.cleanup call. (#414)

Co-authored-by: Kurt Hutchison <[email protected]>

* Update documentation with new gRPC message limits (#415)

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>

* Release (#418) (#421)

* DOC-1074 Document password vault support for VSDK plugins (#347)

* Correct Typo in Example, it should be UNIX not WINDOWS (#360)

* Add documentation for gRPC message and memory limits #390 (#391)

* Fix version number in doc header (#358) (#397)

* Update Delphix Engine version required to 6.0.7.0. (#386) (#398)

* Update SDK Docs deployment to use a deploy_key (#392) (#399)

* CP-6005 Ensure vSDK test coverage (#403)

* CP-6006 Futurize vSDK - Stage 1 (#404)

* Add support for virtualCleanup decorator (#400) (#405)

Co-authored-by: Kurt Hutchison <[email protected]>

* Fixes #401 Networking capabilities should be documented (#402)

Fixes #401 Networking capabilities should be documented

* CP-6009 Add to_str and to_byte helpers (#407)

* CP-6621 bump sdk version to 4.0.0 (#409)

* CP-6694 Update docs for SDK 4.0.0 (#410)

* CP-7022 vSDK 4.0.0 release tasks

* Update VirtualDelete flow diagram to include the virtual.cleanup call. (#414)

Co-authored-by: Kurt Hutchison <[email protected]>

* Update documentation with new gRPC message limits (#415)

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>

Co-authored-by: Raul Santelices <[email protected]>
Co-authored-by: Ranzo J Taylor, III <[email protected]>
Co-authored-by: Jeff Ngo <[email protected]>
Co-authored-by: Ankur <[email protected]>
Co-authored-by: kurthdelphix <[email protected]>
Co-authored-by: Kurt Hutchison <[email protected]>
Co-authored-by: Tom Walsh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants