Adapters for Jubilant Charm Testing Library
Project description
jubilant_adapters
Jubilant Adapters is a back-to-basics effort to facilitate migration of charm repositories using pytest-operator as their integration testing library, to the newer and better jubilant library. By back-to-basics, I mean pure Gang of Four design patterns, instead of blindly throwing in developers, LLMs and/or agents and burning token, CI and developer budget for something that could be achieved much simpler, with a software engineering mindset.
The way it works is to add jubilant_adpaters as a test dependency, use the JujuFixture provided by that lib as the pivot fixture instead of OpsTest, and simply replace all ops_test calls with juju.ext. I have also included a utility script which does that for you, but it is opinionated and may not work optimally in your particular case. But the general flow remains the same regardless of whether or not you use the utility script.
More on JujuFixture
JujuFixture inherits from jubilant.Juju, and adds an extension layer via the ext property, which provides familiar libjuju-style API on the surface, but uses jubilant on the backend.
So instead of calling ops_test.model.deploy(...), you can call juju.ext.model.deploy(...), and so on.
The adapters may not cover 100% of the libjuju API, and I followed the Pareto rule, coupled with my own experience and judgement to provide adpaters for the most widely used APIs. But feel free to contribute and extend the adapters if you feel something is missing, and I would highly appreciate that!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jubilant_adapters-0.1.0.tar.gz.
File metadata
- Download URL: jubilant_adapters-0.1.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
890c3df948f3999dd8b03e8376c786d3446e2a66eb5e54ed0e47019a2e7ce8d4
|
|
| MD5 |
462e8af832385bf54ee1b142069c0ca4
|
|
| BLAKE2b-256 |
a49fddb46c029ebdce838084d0940dd431e6969187c8d18c6d1510e3d36ff0c6
|
Provenance
The following attestation bundles were made for jubilant_adapters-0.1.0.tar.gz:
Publisher:
publish.yaml on imanenami/jubilant_adapters
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jubilant_adapters-0.1.0.tar.gz -
Subject digest:
890c3df948f3999dd8b03e8376c786d3446e2a66eb5e54ed0e47019a2e7ce8d4 - Sigstore transparency entry: 1202640187
- Sigstore integration time:
-
Permalink:
imanenami/jubilant_adapters@e7ccbd038b9121bd68279c447aedd67b46733719 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/imanenami
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@e7ccbd038b9121bd68279c447aedd67b46733719 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file jubilant_adapters-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jubilant_adapters-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a29c711d49a342a8ee3f8db1fb60523555162099406f9c082d5ff100fcb2cdcf
|
|
| MD5 |
df1435829060c9d9bcfdc43605359168
|
|
| BLAKE2b-256 |
69d3d35e7d80c6a74d5a7460c900a07cc9126bad5a770e446525a6aa6818e50f
|
Provenance
The following attestation bundles were made for jubilant_adapters-0.1.0-py3-none-any.whl:
Publisher:
publish.yaml on imanenami/jubilant_adapters
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jubilant_adapters-0.1.0-py3-none-any.whl -
Subject digest:
a29c711d49a342a8ee3f8db1fb60523555162099406f9c082d5ff100fcb2cdcf - Sigstore transparency entry: 1202640190
- Sigstore integration time:
-
Permalink:
imanenami/jubilant_adapters@e7ccbd038b9121bd68279c447aedd67b46733719 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/imanenami
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@e7ccbd038b9121bd68279c447aedd67b46733719 -
Trigger Event:
workflow_dispatch
-
Statement type: