Skip to content

docs: spec spec for a snapd test double for charmlibs.snap - #27

Draft
tonyandrewmeyer wants to merge 1 commit into
canonical:mainfrom
tonyandrewmeyer:spec-snapd-test-double
Draft

docs: spec spec for a snapd test double for charmlibs.snap#27
tonyandrewmeyer wants to merge 1 commit into
canonical:mainfrom
tonyandrewmeyer:spec-snapd-test-double

Conversation

@tonyandrewmeyer

@tonyandrewmeyer tonyandrewmeyer commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

A speculative spec: a stateful snapd test double, Snapd, that replaces charmlibs.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.

@tonyandrewmeyer tonyandrewmeyer changed the title docs: draft spec for a snapd test double for charmlibs.snap docs: spec spec for a snapd test double for charmlibs.snap Jul 30, 2026
@tonyandrewmeyer
tonyandrewmeyer force-pushed the spec-snapd-test-double branch from 20c51ac to 5400202 Compare July 30, 2026 10:32
@tonyandrewmeyer

Copy link
Copy Markdown
Collaborator Author

@james-garner-canonical what do you think? Worth progressing, wait until someone actually asks for something like this, stupid idea, ...?

@james-garner-canonical

james-garner-canonical commented Jul 30, 2026

Copy link
Copy Markdown
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.

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.

2 participants