Closed sminez closed 1 month ago
LGTM :tada:
A thought I've had coming back to the test setup and having to refresh my memory is it might be worth putting a HOW-TO section in the README running through how the scripted client and testing snaps are intended to be used in a future commit.
Good point. There is some existing documentation for the scripted client in the docs directory but it's incorrect now following these changes. I'll get that fixed up. The testing snap though is only intended for use within the integration tests, so I'm not sure if that should be included in the docs?
Good point. There is some existing documentation for the scripted client in the docs directory but it's incorrect now following these changes. I'll get that fixed up. The testing snap though is only intended for use within the integration tests, so I'm not sure if that should be included in the docs?
I'm mainly thinking if someone from snapd needed to update the spread tests and didn't have much context on what was where. So the aa-prompting-test
and integration-tests
artifacts we upload.
I'm mainly thinking if someone from snapd needed to update the spread tests and didn't have much context on what was where. So the
aa-prompting-test
andintegration-tests
artifacts we upload.
Ah ok, well the integration-tests
binary usage in snapd is going to be replaced by re-implementing those tests using the scripted client. aa-prompting-test
is a little more interesting as even if they don't use that specific snap directly, they'll want to use something similar. I'm actually tempted to update it to just accept a shell command and then run that from inside of the snap so that it triggers prompts. I'll look at adding that to this PR while we wait for input from @olivercalder on the snapd side of things :slightly_smiling_face:
I'm actually tempted to update it to just accept a shell command and then run that from inside of the snap so that it triggers prompts.
You can do this with any snap actually, just do snap run --shell <snapname> -c 'echo hello there'
. So I think all we'd need for something like this would be a stub snap with the "home" interface (don't even need apps probably), then we can do everything via snap run --shell
.
See the updated sequence JSON files for examples of how this looks in practice.
A full example "spread" test for a happy path read can be written as follows:
Example output
I'm not sure what to make about this error that I see from
update.go
@olivercalder? I'm assuming it is coming from snapd but I'm not sure why it shows up here in the output from running the scripted client...Output when a sequence succeeds:
Output when a sequence fails: