these test a daemon request and check the expected response type
before returning the response for further specific checks
this simplifies away some checks in the tests but the bigger win is
avoiding the .(*daemon.Resp) casts everywhere, in particular
this will reduce the number of affected places if we change
somewhat the internal types used to produce responses
APIBaseSuite will be used for a while both from daemon
an daemon_test, so opt to make some field exported
for now at least
also use AddCleanup more and correctly
some cleanups in api_users_test.go in preparation to make
live in daemon_test
For this include a seed-error in the /v2/debug?aspect=seeding debug API as well.
* daemon: support seed-error in /v2/debug?aspect=seeding
* cmd/snap: print seed-error if there is one in snap debug seeding
* cmd/snap: adjust seed-error test to new -- placeholder
This, in conjunction with the associated change to `snap debug seeding` client
will help in determining when to output "-" for a time / duration that can't be
calculated because the start time is 0 and the end time is an actual time for
example, where now we output unexpected things like seeding taking 292 years,
instead we could just output `seed-completion: -`
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>