Tests: remove fedoratest and replace it with test_distro

fedoratest was yet another dummy distribution used by unit tests. After
the rework of test_distro, there is no reason to not use it as the only
distro implementation for testing purposes.

Remove fedoratest distro and replace it with test_distro in all affected
tests.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-05-05 11:30:00 +02:00 committed by Ondřej Budai
parent e5dd45b71c
commit f7f064274a
11 changed files with 151 additions and 270 deletions

View file

@ -14,7 +14,7 @@ import (
"path"
"testing"
"github.com/osbuild/osbuild-composer/internal/distro/fedoratest"
"github.com/osbuild/osbuild-composer/internal/distro/test_distro"
rpmmd_mock "github.com/osbuild/osbuild-composer/internal/mocks/rpmmd"
"github.com/osbuild/osbuild-composer/internal/rpmmd"
"github.com/osbuild/osbuild-composer/internal/weldr"
@ -44,8 +44,8 @@ func executeTests(m *testing.M) int {
}
fixture := rpmmd_mock.BaseFixture(path.Join(tmpdir, "/jobs"))
rpm := rpmmd_mock.NewRPMMDMock(fixture)
distro := fedoratest.New()
arch, err := distro.GetArch("x86_64")
distro := test_distro.New()
arch, err := distro.GetArch(test_distro.TestArchName)
if err != nil {
panic(err)
}
@ -62,7 +62,7 @@ func executeTests(m *testing.M) int {
}
}()
testState, err = setUpTestState(socketPath, true)
testState, err = setUpTestState(socketPath, test_distro.TestImageTypeName, true)
if err != nil {
log.Fatalf("ERROR: Test setup failed: %s\n", err)
}