Replace ioutil.WriteFile with os.WriteFile since the former has been
deprecated since go1.16 and simply calls the latter.
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
* image, store/tooling: fix how validation-sets and required revision was set for snaps that were controlled by validation-sets. Mirror how it's done for the snap validate --refresh.
* image: fix unit tests and optimize a bit how many times we call validationSetsAndRevisionForSnap
* image: wrong revision in comment
* image: review feedback, add TODO around missing logic for optional snaps, and add unit test for conflict logic that is now added
* image: review feedback, be a bit more consistent in naming between keys and actual validation-set objects
* image: pass validation-sets to store functions
* image: get fetched validation set assertions and use them for keys to store
* image: add additional check to unit test
* image: move seed database into imageSeeder structure
* image: fix unit test
* image: review feedback
add unit test case for the case where we end up downloading a different revision than we requested
* image: fix merge gone wrong
* image,seed/seedwriter: integrate SeedManifest into seedwriter.Writer
* seed/seedwriter: add a docstring to writer.SeedManifest()
* image,seed/seedwriter: fix uses of SeedManifest after rename
* seed/seedwriter: review feedback
don't copy ManifestPath as we already store a copy of options, but do keep a new instance of Manifest itself as we may initialize a new copy, fix docstring typo
move initManifest function to Options as a member function. Add seedwriter specific unit tests for manifest functionality.
rename initManifest() to manifest()
* image: review feedback
add unit test case for the case where we end up downloading a different revision than we requested
* image: fix merge gone wrong
* multiple: rename SeedManifest to Manifest for most references, unless it makes sense in the context to keep it as SeedManifest
* seed/seedwriter: rename tests from SeedManifest to Manifest
* multiple: review feedback
rename NewManifestForTest to MockManifest
* image: review feedback
add unit test case for the case where we end up downloading a different revision than we requested
* multiple: move SeedManifest into the seedwriter package.
* image: fix merge gone wrong
* asserts,seed/seedwriter: refactor RefAssertsFetcher into a SeedAssertionFetcher with support for FetchSequence, and its own set of unit tests.
* seed/seedwriter: review feedback
Removed the TODO and updated docs for Writer.Start
* seed/seedwriter: review feedback
remove a line of the docs for SeedAssertionFetcher
* seed/seedwriter: review feedback
add additional case for calling FetchSequence with the default fetcher
* image,tests: add architecture verification check as a part of prepare-image, for downloaded snaps and local snaps.
* tests: fix shellcheck warning
* image: review feedback
correct architecture detection, move the arch check from asserts fetching to before download step.
* image: use *image* instead of *seed* for determineImageArchitecture
* image: review feedback
fix incorrect logic in validateSnapArchs, which only happened to work since there was only one arch listed. Add additional unit test cases
* image: add a break, add some docs to unit test
* image: review feedback
separate out the arch-check logic from the loop itself.
introduce a new type imageSeeder to replace seedOptions, and move several members into that. Move some of the functions under the imageSeeder to utilize stored members.