Skip to content

Conversation

@dgarros
Copy link
Contributor

@dgarros dgarros commented Dec 24, 2024

This PR moves some tests utilities previously part of infrahub.testing into the SDK under infrahub_sdk.testing.

infrahub_sdk.testing is designed to work with the package infrahub_testcontainers that makes it possible to run integration tests for all projects using the Python SDK
As part of this PR, I fixed 2 integration tests as part of tests/integration/test_node.py, there is still a lot of work to fix all of them.

@dgarros dgarros force-pushed the dga-20241223-testing branch from 296b5b8 to e4d190f Compare December 24, 2024 10:25
@codecov
Copy link

codecov bot commented Dec 24, 2024

Codecov Report

Attention: Patch coverage is 8.66142% with 116 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/testing/repository.py 0.00% 60 Missing ⚠️
infrahub_sdk/testing/schemas/car_person.py 0.00% 45 Missing ⚠️
infrahub_sdk/testing/docker.py 0.00% 10 Missing ⚠️
infrahub_sdk/schema/main.py 91.66% 1 Missing ⚠️
@@             Coverage Diff             @@
##           develop     #183      +/-   ##
===========================================
- Coverage    66.48%   65.47%   -1.02%     
===========================================
  Files           78       81       +3     
  Lines         7123     7249     +126     
  Branches      1393     1407      +14     
===========================================
+ Hits          4736     4746      +10     
- Misses        2000     2116     +116     
  Partials       387      387              
Flag Coverage Δ
python-3.10 43.75% <0.00%> (-0.78%) ⬇️
python-3.11 43.75% <0.00%> (-0.78%) ⬇️
python-3.12 43.75% <0.00%> (-0.78%) ⬇️
python-3.13 43.75% <0.00%> (-0.78%) ⬇️
python-3.9 42.85% <0.00%> (-0.76%) ⬇️
python-filler-3.12 24.43% <8.66%> (-0.30%) ⬇️

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

Files with missing lines Coverage Δ
infrahub_sdk/schema/main.py 82.92% <91.66%> (+0.37%) ⬆️
infrahub_sdk/testing/docker.py 0.00% <0.00%> (ø)
infrahub_sdk/testing/schemas/car_person.py 0.00% <0.00%> (ø)
infrahub_sdk/testing/repository.py 0.00% <0.00%> (ø)

@dgarros dgarros requested a review from a team December 24, 2024 12:24
@dgarros dgarros marked this pull request as ready for review December 24, 2024 12:24
Copy link
Contributor

@ajtmccarty ajtmccarty left a comment

Choose a reason for hiding this comment

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

are these supposed to run as part of the CI eventually?


# @property
# def seen_routing_keys(self) -> list[str]:
# return list(self.messages_per_routing_key.keys())
Copy link
Contributor

Choose a reason for hiding this comment

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

are you hoping to uncomment this file in a later PR or should it be deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we need to finish the conversion of all the integration tests, probably best to keep it for now

@dgarros dgarros merged commit fc61aff into develop Dec 24, 2024
13 checks passed
@dgarros dgarros deleted the dga-20241223-testing branch December 24, 2024 16:03
@dgarros dgarros mentioned this pull request Dec 30, 2024
6 tasks
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.

3 participants