You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new collection of tools and utilities to help with testing is available under `infrahub_sdk.testing`.
21
+
22
+
The first component available is a `TestInfrahubDockerClient`, a pytest Class designed to help creating integration tests based on Infrahub. See a simple example below to help you get started.
23
+
24
+
> the installation of `infrahub-testcontainers` is required
25
+
26
+
```python
27
+
import pytest
28
+
29
+
from infrahub_sdk import InfrahubClient
30
+
from infrahub_sdk.testing.docker import TestInfrahubDockerClient
31
+
32
+
classTestInfrahubNode(TestInfrahubDockerClient):
33
+
34
+
@pytest.fixture(scope="class")
35
+
definfrahub_version(self) -> str:
36
+
"""Required (for now) to define the version of infrahub to use."""
- The Pydantic models for the schema have been split into multiple versions to align better with the different phase of the lifecycle of the schema.
49
+
- User input: includes only the options available for a user to define (NodeSchema, AttributeSchema, RelationshipSchema, GenericSchema)
50
+
- API: Format of the schema as exposed by the API in infrahub with some read only settings (NodeSchemaAPI, AttributeSchemaAPI, RelationshipSchemaAPI, GenericSchemaAPI)
51
+
52
+
### Fixed
53
+
54
+
- Fix behaviour of attribute value coming from resource pools for async client ([#66](https://github.com/opsmill/infrahub-sdk-python/issues/66))
55
+
- Convert import_root to a string if it was submitted as a Path object to ensure that anything added to sys.path is a string
56
+
- Fix relative imports for the pytest plugin, note that the relative imports can't be at the top level of the repository alongside .infrahub.yml. They have to be located within a subfolder. ([#166](https://github.com/opsmill/infrahub-sdk-python/issues/166))
@@ -60,7 +104,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang
60
104
61
105
### Removed
62
106
63
-
- Breaking change: Removed all exports from infrahub_sdk/__init__.py except InfrahubClient, InfrahubClientSync and Config. If you previously imported other classes such as InfrahubNode from the root level these need to change to instead be an absolute path.
107
+
- Breaking change: Removed all exports from `infrahub_sdk/__init__.py` except InfrahubClient, InfrahubClientSync and Config. If you previously imported other classes such as InfrahubNode from the root level these need to change to instead be an absolute path.
0 commit comments