As some of you know, I am working on a feature where subiquity will offer the user a change to refresh to a newer version of subiquity during the install if one is available. To test this I need to be able to easily create a situation where snapd in a vm thinks there is an update available.
The fake store (tests/lib/fakestore) in the snapd source is the tool for this, but I can’t quite make it work. I’ve got a snapd in a vm, built with -tags withtestkeys and configured to talk to the store running on my host system but whenever I try to do anything store related, snapd says “error: cannot get nonce from store: store server returned status 418”. I think this means that I am hitting an endpoint the fakestore does not support – looking at the logs, it seems to be “/api/v1/snaps/auth/nonces”, which certainly the fakestore doesn’t seem to support.
It also looks like the fakestore only implements a pretty small set of store apis. Would it be possible to generically forward other requests to the fallback store?