From dcc9cdedee8d0d893ffead8c7947f4b9e111ad56 Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Mon, 9 Dec 2019 13:42:04 +0100 Subject: [PATCH] distro: rename output of qcow2 image to disk.qcow2 Integration tests currently expect that and they need to be able to run against lorax-composer (which outputs disk.qcow2) and osbuild-composer. --- internal/distro/fedora30/distro.go | 4 ++-- internal/distro/fedora30/distro_test.go | 2 +- internal/distro/rhel82/distro.go | 4 ++-- internal/distro/rhel82/distro_test.go | 2 +- test/cases/qcow2_empty_blueprint.json | 4 ++-- test/cases/qcow2_local_boot.json | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/distro/fedora30/distro.go b/internal/distro/fedora30/distro.go index c21389d57..59b3edea4 100644 --- a/internal/distro/fedora30/distro.go +++ b/internal/distro/fedora30/distro.go @@ -101,7 +101,7 @@ func New() *Fedora30 { } r.outputs["qcow2"] = output{ - Name: "image.qcow2", + Name: "disk.qcow2", MimeType: "application/x-qemu-disk", Packages: []string{ "kernel-core", @@ -122,7 +122,7 @@ func New() *Fedora30 { }, KernelOptions: "ro biosdevname=0 net.ifnames=0", IncludeFSTab: true, - Assembler: r.qemuAssembler("qcow2", "image.qcow2"), + Assembler: r.qemuAssembler("qcow2", "disk.qcow2"), } r.outputs["openstack"] = output{ diff --git a/internal/distro/fedora30/distro_test.go b/internal/distro/fedora30/distro_test.go index d4af43106..f6c7a4f30 100644 --- a/internal/distro/fedora30/distro_test.go +++ b/internal/distro/fedora30/distro_test.go @@ -63,7 +63,7 @@ func TestFilenameFromType(t *testing.T) { { name: "qcow2", args: args{"qcow2"}, - want: "image.qcow2", + want: "disk.qcow2", want1: "application/x-qemu-disk", }, { diff --git a/internal/distro/rhel82/distro.go b/internal/distro/rhel82/distro.go index 44dbc6dcf..73497d140 100644 --- a/internal/distro/rhel82/distro.go +++ b/internal/distro/rhel82/distro.go @@ -150,7 +150,7 @@ func New() *RHEL82 { } r.outputs["qcow2"] = output{ - Name: "image.qcow2", + Name: "disk.qcow2", MimeType: "application/x-qemu-disk", Packages: []string{ "kernel-core", @@ -170,7 +170,7 @@ func New() *RHEL82 { }, IncludeFSTab: true, KernelOptions: "ro net.ifnames=0", - Assembler: r.qemuAssembler("qcow2", "image.qcow2", 3*GigaByte), + Assembler: r.qemuAssembler("qcow2", "disk.qcow2", 3*GigaByte), } r.outputs["openstack"] = output{ diff --git a/internal/distro/rhel82/distro_test.go b/internal/distro/rhel82/distro_test.go index 1deccdd79..3a7bf6044 100644 --- a/internal/distro/rhel82/distro_test.go +++ b/internal/distro/rhel82/distro_test.go @@ -63,7 +63,7 @@ func TestFilenameFromType(t *testing.T) { { name: "qcow2", args: args{"qcow2"}, - want: "image.qcow2", + want: "disk.qcow2", want1: "application/x-qemu-disk", }, { diff --git a/test/cases/qcow2_empty_blueprint.json b/test/cases/qcow2_empty_blueprint.json index 35f34e1b6..af2f83841 100644 --- a/test/cases/qcow2_empty_blueprint.json +++ b/test/cases/qcow2_empty_blueprint.json @@ -6,7 +6,7 @@ "fedora": "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97" }, "output-format": "qcow2", - "filename": "image.qcow2", + "filename": "disk.qcow2", "blueprint": {} }, "pipeline": { @@ -116,7 +116,7 @@ "name": "org.osbuild.qemu", "options": { "format": "qcow2", - "filename": "image.qcow2", + "filename": "disk.qcow2", "ptuuid": "0x14fc63d2", "root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac", "size": 3222274048 diff --git a/test/cases/qcow2_local_boot.json b/test/cases/qcow2_local_boot.json index 75314feb0..6c12c4dae 100644 --- a/test/cases/qcow2_local_boot.json +++ b/test/cases/qcow2_local_boot.json @@ -6,7 +6,7 @@ "distro": "fedora-30", "arch": "x86_64", "output-format": "qcow2", - "filename": "image.qcow2", + "filename": "disk.qcow2", "blueprint-draft": { "name": "qcow2-boot-test", "description": "Image for boot test", @@ -166,7 +166,7 @@ "name": "org.osbuild.qemu", "options": { "format": "qcow2", - "filename": "image.qcow2", + "filename": "disk.qcow2", "ptuuid": "0x14fc63d2", "root_fs_uuid": "76a22bf4-f153-4541-b6c7-0332c0dfaeac", "size": 3222274048