distro/fedora: implementation cleanups for newer releases
Clean up some implementation aspects of the Fedora distro definition: - Do not have default Fedora distro version and use `fedora` as the package name in all places that use it, instead of `fedora33`. - Fix bugs when wrong (Fedora 33) values were returned by `OSTreeRef()` and `Releasever()` for newer Fedora releases. - Test Fedora 35 in package unit tests. - Add unit test for `OSTreeRef()` method. - Use architecture name constants from `distro` package, instead of string literals. Fix #1802 Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
8b8c7bbbbe
commit
b9efe82bd7
5 changed files with 138 additions and 117 deletions
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
"github.com/osbuild/osbuild-composer/internal/common"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/fedora33"
|
||||
fedora "github.com/osbuild/osbuild-composer/internal/distro/fedora33"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro/test_distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/target"
|
||||
|
|
@ -303,7 +303,7 @@ func Test_upgrade(t *testing.T) {
|
|||
assert.NoErrorf(err, "Could not read test-store '%s': %v", fileName, err)
|
||||
err = json.Unmarshal([]byte(file), &storeStruct)
|
||||
assert.NoErrorf(err, "Could not parse test-store '%s': %v", fileName, err)
|
||||
arch, err := fedora33.New().GetArch("x86_64")
|
||||
arch, err := fedora.NewF35().GetArch(distro.X86_64ArchName)
|
||||
assert.NoError(err)
|
||||
store := newStoreFromV0(storeStruct, arch, nil)
|
||||
assert.Equal(1, len(store.blueprints))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue