From 580366d1f3dea78c41a9e3ccc1b459db642fef81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Sat, 7 Dec 2024 15:29:13 +0100 Subject: [PATCH] osbuild-dnf-json-tests: don't set OSTree options for non-OSTree images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Hozza --- cmd/osbuild-dnf-json-tests/main_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/osbuild-dnf-json-tests/main_test.go b/cmd/osbuild-dnf-json-tests/main_test.go index 5db12ea08..09dd9ada6 100644 --- a/cmd/osbuild-dnf-json-tests/main_test.go +++ b/cmd/osbuild-dnf-json-tests/main_test.go @@ -55,15 +55,17 @@ func TestCrossArchDepsolve(t *testing.T) { InstallationDevice: "/dev/null", } } + var options distro.ImageOptions + if imgType.OSTreeRef() != "" { + options.OSTree = &ostree.ImageOptions{ + URL: "https://example.com", + } + } manifest, _, err := imgType.Manifest( &blueprint.Blueprint{ Customizations: customizations, }, - distro.ImageOptions{ - OSTree: &ostree.ImageOptions{ - URL: "https://example.com", // required by some image types - }, - }, + options, repos[archStr], 0) assert.NoError(t, err)