debian-forge-composer/internal/distro/distro_test.go
Tom Gundersen 25abccf66d tree-wide: drop f31 support
We no longer release into F31, and the right specfile was anyway not
being tested.

This allows us to remove a workaround that updates the VMs during
deploy, and other fedora-31 specific hacks.
2020-10-21 09:04:13 +02:00

36 lines
957 B
Go

package distro_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/osbuild/osbuild-composer/internal/distro"
"github.com/osbuild/osbuild-composer/internal/distro/distro_test_common"
"github.com/osbuild/osbuild-composer/internal/distro/fedora32"
"github.com/osbuild/osbuild-composer/internal/distro/fedora33"
"github.com/osbuild/osbuild-composer/internal/distro/rhel8"
)
func TestDistro_Manifest(t *testing.T) {
distro_test_common.TestDistro_Manifest(
t,
"../../test/data/cases/",
"*",
fedora32.New(), fedora33.New(), rhel8.New(),
)
}
// Test that all distros are registered properly and that Registry.List() works.
func TestDistro_RegistryList(t *testing.T) {
expected := []string{
"fedora-32",
"fedora-33",
"rhel-8",
}
distros, err := distro.NewRegistry(fedora32.New(), fedora33.New(), rhel8.New())
require.NoError(t, err)
require.Equalf(t, expected, distros.List(), "unexpected list of distros")
}