docs: spec spec for a snapd test double for charmlibs.snap - #27
Draft
tonyandrewmeyer wants to merge 1 commit into
Draft
docs: spec spec for a snapd test double for charmlibs.snap#27tonyandrewmeyer wants to merge 1 commit into
tonyandrewmeyer wants to merge 1 commit into
Conversation
tonyandrewmeyer
force-pushed
the
spec-snapd-test-double
branch
from
July 30, 2026 10:32
20c51ac to
5400202
Compare
Collaborator
Author
|
@james-garner-canonical what do you think? Worth progressing, wait until someone actually asks for something like this, stupid idea, ...? |
Contributor
|
I think this is a really neat idea. I could see us shipping the fake snapd context manager in a charmlibs.snap_testing package. |
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.
A speculative spec: a stateful snapd test double,
Snapd, that replacescharmlibs.snap's client layer so machine charms that touch snaps can be tested in a way that feels natural to Scenario users. This would replace monkeypatching the library's public functions.The spec is example-heavy rather than implementation-heavy. I'm showing what a charm test looks like with this available, and to see whether the value proposition lands, before anyone commits to building it. Nothing is implemented, although obviously having an agent do that for a proof-of-concept would be trivial.