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

fix(core): Reorganize core tests and improve #693

Merged
merged 6 commits into from
Sep 8, 2024

Conversation

Tranquility2
Copy link
Contributor

@Tranquility2 Tranquility2 commented Aug 23, 2024

Found some loss ends while working on fixing the typing.

The idea in this PR is to reorganize the tests to better reflect the use case (not all just in test_core)
This should help help avoid later issues when we fix more typing (allowing better isolation/management)
Also took this opportunity to add missing tests for utils and config

So now we have:

  1. test_image - stripped from test_core
  2. test_waiting_utils - stripped from test_core
  3. a much cleaner test_core
  4. test_utils - new
  5. test_config - new
---------- coverage: platform linux, python 3.10.12-final-0 ----------
Name                                        Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------------------------
core/testcontainers/core/__init__.py            0      0      0      0   100%
core/testcontainers/core/auth.py               31      0     12      0   100%
core/testcontainers/core/config.py             59      0     20      0   100%
core/testcontainers/core/container.py         159     23     40      9    80%   20, 61-62, 82-84, 121->123, 135, 138, 158-162, 186, 191, 244->260, 250-259, 261
core/testcontainers/core/docker_client.py     118     18     32      9    79%   63-65, 96, 134->133, 138-139, 141, 152, 161, 179, 196, 200-201, 204-208
core/testcontainers/core/exceptions.py          3      0      0      0   100%
core/testcontainers/core/generic.py            28     28      0      0     0%   13-82
core/testcontainers/core/image.py              47      2      6      2    92%   10, 68
core/testcontainers/core/labels.py             23      0      8      0   100%
core/testcontainers/core/network.py            20      1      0      0    95%   30
core/testcontainers/core/utils.py              46      9     10      2    77%   27->exit, 63-70, 79
core/testcontainers/core/version.py            20      0     12      0   100%
core/testcontainers/core/waiting_utils.py      48      8     14      4    81%   26, 60-67, 77, 104->106, 122
---------------------------------------------------------------------------------------
TOTAL                                         602     89    154     26    83%

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@2cf5a9f). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #693   +/-   ##
=======================================
  Coverage        ?   81.56%           
=======================================
  Files           ?       12           
  Lines           ?      602           
  Branches        ?       89           
=======================================
  Hits            ?      491           
  Misses          ?       85           
  Partials        ?       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexanderankin alexanderankin merged commit f1665f3 into testcontainers:main Sep 8, 2024
13 checks passed
alexanderankin pushed a commit that referenced this pull request Oct 14, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.8.2](testcontainers-v4.8.1...testcontainers-v4.8.2)
(2024-09-27)


### Bug Fixes

* **core:** Reorganize core tests and improve
([#693](#693))
([f1665f3](f1665f3))
* **core:** Typing in auth
([#691](#691))
([66726b6](66726b6))
* **core:** Typing in config + utils
([#692](#692))
([794a22e](794a22e))
* **keycloak:** Add support for Keycloak version >=25
([#694](#694))
([62bd0de](62bd0de))
* mysql typo
([#705](#705))
([85d6078](85d6078)),
closes
[#689](#689)
* **opensearch:** add support for admin_password in >= 2.12
([#697](#697))
([935693e](935693e))
* postgres use psql instead of logs
([#704](#704))
([4365754](4365754))
* **tests:** Missing artifacts (include-hidden-files)
([#699](#699))
([8f1165d](8f1165d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants