Adjust code to new version of osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
016051a4b8
commit
1afe7d20c8
6 changed files with 20 additions and 20 deletions
|
|
@ -10,11 +10,11 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/blueprint"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
rhel "github.com/osbuild/images/pkg/distro/rhel8"
|
||||
"github.com/osbuild/images/pkg/ostree"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/dnfjson"
|
||||
)
|
||||
|
|
@ -85,22 +85,22 @@ func TestDepsolvePackageSets(t *testing.T) {
|
|||
|
||||
// Set up temporary directory for rpm/dnf cache
|
||||
dir := t.TempDir()
|
||||
solver := dnfjson.NewSolver(cs9.ModulePlatformID(), cs9.Releasever(), platform.ARCH_X86_64.String(), cs9.Name(), dir)
|
||||
solver := dnfjson.NewSolver(cs9.ModulePlatformID(), cs9.Releasever(), arch.ARCH_X86_64.String(), cs9.Name(), dir)
|
||||
|
||||
repos, err := rpmmd.LoadRepositories([]string{repoDir}, cs9.Name())
|
||||
require.NoErrorf(t, err, "Failed to LoadRepositories %v", cs9.Name())
|
||||
x86Repos, ok := repos[platform.ARCH_X86_64.String()]
|
||||
require.Truef(t, ok, "failed to get %q repos for %q", platform.ARCH_X86_64.String(), cs9.Name())
|
||||
x86Repos, ok := repos[arch.ARCH_X86_64.String()]
|
||||
require.Truef(t, ok, "failed to get %q repos for %q", arch.ARCH_X86_64.String(), cs9.Name())
|
||||
|
||||
x86Arch, err := cs9.GetArch(platform.ARCH_X86_64.String())
|
||||
require.Nilf(t, err, "failed to get %q arch of %q distro", platform.ARCH_X86_64.String(), cs9.Name())
|
||||
x86Arch, err := cs9.GetArch(arch.ARCH_X86_64.String())
|
||||
require.Nilf(t, err, "failed to get %q arch of %q distro", arch.ARCH_X86_64.String(), cs9.Name())
|
||||
|
||||
qcow2ImageTypeName := "qcow2"
|
||||
qcow2Image, err := x86Arch.GetImageType(qcow2ImageTypeName)
|
||||
require.Nilf(t, err, "failed to get %q image type of %q/%q distro/arch", qcow2ImageTypeName, cs9.Name(), platform.ARCH_X86_64.String())
|
||||
require.Nilf(t, err, "failed to get %q image type of %q/%q distro/arch", qcow2ImageTypeName, cs9.Name(), arch.ARCH_X86_64.String())
|
||||
|
||||
manifestSource, _, err := qcow2Image.Manifest(&blueprint.Blueprint{Packages: []blueprint.Package{{Name: "bind"}}}, distro.ImageOptions{}, x86Repos, 0)
|
||||
require.Nilf(t, err, "failed to initialise manifest for %q image type of %q/%q distro/arch", qcow2ImageTypeName, cs9.Name(), platform.ARCH_X86_64.String())
|
||||
require.Nilf(t, err, "failed to initialise manifest for %q image type of %q/%q distro/arch", qcow2ImageTypeName, cs9.Name(), arch.ARCH_X86_64.String())
|
||||
imagePkgSets := manifestSource.GetPackageSetChains()
|
||||
|
||||
gotPackageSpecsSets := make(map[string][]rpmmd.PackageSpec, len(imagePkgSets))
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/osbuild-composer/cmd/osbuild-image-tests/constants"
|
||||
"github.com/osbuild/osbuild-composer/internal/boot"
|
||||
"github.com/osbuild/osbuild-composer/internal/boot/azuretest"
|
||||
|
|
@ -410,7 +410,7 @@ func testBootUsingOpenStack(t *testing.T, imagePath string) {
|
|||
currentArch := common.CurrentArch()
|
||||
|
||||
// skip on aarch64 because we don't have aarch64 openstack or kvm machines
|
||||
if currentArch == platform.ARCH_AARCH64.String() {
|
||||
if currentArch == arch.ARCH_AARCH64.String() {
|
||||
t.Skip("Openstack boot test is skipped on aarch64.")
|
||||
// if no credentials are given, fall back to qemu
|
||||
} else if (creds == gophercloud.AuthOptions{}) {
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ import (
|
|||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/fedora"
|
||||
"github.com/osbuild/images/pkg/distroregistry"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
"github.com/osbuild/osbuild-composer/internal/dnfjson"
|
||||
|
|
@ -127,7 +127,7 @@ func main() {
|
|||
awsTarget.OsbuildArtifact.ExportFilename = "image.ami"
|
||||
|
||||
d := fedora.NewF37()
|
||||
a, err := d.GetArch(platform.ARCH_X86_64.String())
|
||||
a, err := d.GetArch(arch.ARCH_X86_64.String())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
repos := allRepos[platform.ARCH_X86_64.String()]
|
||||
repos := allRepos[arch.ARCH_X86_64.String()]
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
panic("os.UserHomeDir(): " + err.Error())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue