test: Add fixture support for blueprint changes

There is a problem with blueprint changes, once the server is restarted
the previous changes are all lost because they are not serialized to
disk.

This adds test fixture support so that new tests can be added before
fixing the problem. It adds store.FixtureOldChanges with blueprints
changes and empty blueprints.

Related: rhbz#1922845
This commit is contained in:
Brian C. Lane 2022-01-19 14:44:23 -08:00 committed by Ondřej Budai
parent 346486cd3f
commit a3b415d1df
3 changed files with 100 additions and 1 deletions

View file

@ -182,3 +182,20 @@ func BadFetch(tmpdir string) Fixture {
createBaseWorkersFixture(tmpdir),
}
}
func OldChangesFixture(tmpdir string) Fixture {
return Fixture{
fetchPackageList{
generatePackageList(),
map[string]string{"base": "sha256:f34848ca92665c342abd5816c9e3eda0e82180671195362bcd0080544a3bc2ac"},
nil,
},
depsolve{
createBaseDepsolveFixture(),
map[string]string{"base": "sha256:f34848ca92665c342abd5816c9e3eda0e82180671195362bcd0080544a3bc2ac"},
nil,
},
store.FixtureOldChanges(),
createBaseWorkersFixture(tmpdir),
}
}