From d46d430ae194cf87a95ec5f15420b0bd3738ac54 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Dec 2024 16:32:19 +0100 Subject: [PATCH] image-builder: add integration test for container resolving This commit adds an integration test for the container resolving when generating a manifest. This is sadly quite indirect right now because `manifestgen` needs some more support from `images` and the `distro_test` code there (that will hopefully come soon(ish)). --- cmd/image-builder/main_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/image-builder/main_test.go b/cmd/image-builder/main_test.go index e4d9245d..da452980 100644 --- a/cmd/image-builder/main_test.go +++ b/cmd/image-builder/main_test.go @@ -134,6 +134,11 @@ func hasDepsolveDnf() bool { } var testBlueprint = `{ + "containers": [ + { + "source": "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal" + } + ], "customizations": { "user": [ { @@ -183,4 +188,5 @@ func TestManifestIntegrationSmoke(t *testing.T) { // XXX: provide helpers in manifesttest to extract this in a nicer way assert.Contains(t, fakeStdout.String(), `{"type":"org.osbuild.users","options":{"users":{"alice":{}}}}`) + assert.Contains(t, fakeStdout.String(), `"image":{"name":"registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal"`) }