test: add conformance tests for the tracing and certificate_transfer interfaces - #2711
Open
tonyandrewmeyer wants to merge 1 commit into
Open
test: add conformance tests for the tracing and certificate_transfer interfaces#2711tonyandrewmeyer wants to merge 1 commit into
tonyandrewmeyer wants to merge 1 commit into
Conversation
…interfaces The requirer-side behaviour of `ops_tracing` is pinned only indirectly at the moment, through `test_api.py` and the vendored charm libs' own assumptions. These tests read the two interface reference pages and assert the documented clauses against `Tracing`, driven through `ops.testing`, so that a change in the upstream contract forces a deliberate decision rather than showing up as a surprise later. Each test names the clause it covers in its docstring. Nothing here touches `ops_tracing` itself, and the tests pass against the vendored pydantic models as they stand.
james-garner-canonical
approved these changes
Sep 1, 2026
james-garner-canonical
left a comment
Contributor
There was a problem hiding this comment.
I haven't read every test thoroughly, but I'm a big fan of this idea.
My only concern is that we don't have a good way to track if upstream behaviour definitions change, but that shouldn't block these tests being added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The requirer-side behaviour of ops_tracing is currently pinned only indirectly, through test_api.py and the vendored charm libs' own assumptions. These tests read the tracing v2 and certificate_transfer v1 interface reference pages and assert the documented clauses against Tracing, driven through ops.testing, so that a change in the upstream contract forces a decision in our vendored use.
Each test names in its docstring the clause it covers. Nothing here touches ops_tracing itself.
These are extracted from #2557, which de-pydantic's the two vendored databag modules. Landing them first means that PR can show the same tests green before and after, rather than asking a reviewer to take the refactor on trust. Also, if we decide to not de-vendor in the way #2557 proposes, these tests still have value.