You add files to snapd. How do you run tests against them, if their version used comes from the core snap?

For classic, the answer is in the shell function update_core_snap_for_classic_reexec, defined in tests/lib/prepare.sh. It grabs the core snap, unpacks it, does ungodly things to it and then packs it back up. If your new files aren’t in the core when running tests, and your tests aren’t clearing MODIFY_CORE_SNAP_FOR_REEXEC, then all you need to do is add a cp in there somewhere. It’s not scary at all; take a look.

For core-side tests, look in setup_reflash_magic in the same file. Good luck.

1 Like

It’s not entirely clear what the question is. Can you provide some more context?