osbuild-dnf-json-tests: don't set OSTree options for non-OSTree images

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-12-07 15:29:13 +01:00 committed by Ondřej Budai
parent 1f590aa232
commit 580366d1f3

View file

@ -55,15 +55,17 @@ func TestCrossArchDepsolve(t *testing.T) {
InstallationDevice: "/dev/null", InstallationDevice: "/dev/null",
} }
} }
var options distro.ImageOptions
if imgType.OSTreeRef() != "" {
options.OSTree = &ostree.ImageOptions{
URL: "https://example.com",
}
}
manifest, _, err := imgType.Manifest( manifest, _, err := imgType.Manifest(
&blueprint.Blueprint{ &blueprint.Blueprint{
Customizations: customizations, Customizations: customizations,
}, },
distro.ImageOptions{ options,
OSTree: &ostree.ImageOptions{
URL: "https://example.com", // required by some image types
},
},
repos[archStr], 0) repos[archStr], 0)
assert.NoError(t, err) assert.NoError(t, err)