Merge pull request #12251 from mvo5/fakeinstaller-fix-seeding-dir

tests: ensure that fakeinstaller put the seed into the right place
This commit is contained in:
Michael Vogt
2022-10-11 11:01:16 +02:00
committed by GitHub

View File

@@ -278,6 +278,11 @@ func createSeedOnTarget(bootDevice, seedLabel string) error {
dataMnt := runMntFor("ubuntu-data")
src := dirs.SnapSeedDir
dst := dirs.SnapSeedDirUnder(dataMnt)
// Remove any existing seed on the target fs and then put the
// selected seed in place on the target
if err := os.RemoveAll(dst); err != nil {
return err
}
if err := os.MkdirAll(filepath.Dir(dst), 0755); err != nil {
return err
}