test/cases: rename output-format to image-type
Bring this in line with our naming convention. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
fa015a70f6
commit
a949843f1e
19 changed files with 31 additions and 31 deletions
|
|
@ -28,7 +28,7 @@ func TestDistro_Manifest(t *testing.T) {
|
|||
type composeRequest struct {
|
||||
Distro string `json:"distro"`
|
||||
Arch string `json:"arch"`
|
||||
OutputFormat string `json:"output-format"`
|
||||
ImageType string `json:"image-type"`
|
||||
Blueprint *blueprint.Blueprint `json:"blueprint"`
|
||||
}
|
||||
type rpmMD struct {
|
||||
|
|
@ -56,7 +56,7 @@ func TestDistro_Manifest(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("rpmmd.LoadRepositories: %v", err)
|
||||
}
|
||||
t.Run(tt.ComposeRequest.OutputFormat, func(t *testing.T) {
|
||||
t.Run(tt.ComposeRequest.ImageType, func(t *testing.T) {
|
||||
distros, err := distro.NewRegistry(fedora30.New(), fedora31.New(), fedora32.New(), rhel81.New(), rhel82.New())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
@ -71,9 +71,9 @@ func TestDistro_Manifest(t *testing.T) {
|
|||
t.Errorf("unknown arch: %v", tt.ComposeRequest.Arch)
|
||||
return
|
||||
}
|
||||
imageType, err := arch.GetImageType(tt.ComposeRequest.OutputFormat)
|
||||
imageType, err := arch.GetImageType(tt.ComposeRequest.ImageType)
|
||||
if err != nil {
|
||||
t.Errorf("unknown image type: %v", tt.ComposeRequest.OutputFormat)
|
||||
t.Errorf("unknown image type: %v", tt.ComposeRequest.ImageType)
|
||||
return
|
||||
}
|
||||
got, err := imageType.Manifest(tt.ComposeRequest.Blueprint.Customizations,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"filename": "image.raw.xz",
|
||||
"output-format": "ami",
|
||||
"image-type": "ami",
|
||||
"blueprint": {}
|
||||
},
|
||||
"manifest": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "ext4-filesystem",
|
||||
"image-type": "ext4-filesystem",
|
||||
"filename": "filesystem.img",
|
||||
"blueprint": {
|
||||
"name": "ext4-filesystem-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "openstack",
|
||||
"image-type": "openstack",
|
||||
"filename": "disk.qcow2",
|
||||
"blueprint": {
|
||||
"name": "openstack-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "partitioned-disk",
|
||||
"image-type": "partitioned-disk",
|
||||
"filename": "disk.img",
|
||||
"blueprint": {
|
||||
"name": "partitioned-disk-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "qcow2",
|
||||
"image-type": "qcow2",
|
||||
"filename": "disk.qcow2",
|
||||
"blueprint": {
|
||||
"name": "qcow2-boot-test",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"type": "nspawn-extract"
|
||||
},
|
||||
"compose-request": {
|
||||
"output-format": "tar",
|
||||
"image-type": "tar",
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"filename": "root.tar.xz",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vhd",
|
||||
"image-type": "vhd",
|
||||
"filename": "disk.vhd",
|
||||
"blueprint": {
|
||||
"name": "vhd-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vmdk",
|
||||
"image-type": "vmdk",
|
||||
"filename": "disk.vmdk",
|
||||
"blueprint": {
|
||||
"name": "vmdk-boot-test",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"filename": "image.raw.xz",
|
||||
"output-format": "ami",
|
||||
"image-type": "ami",
|
||||
"blueprint": {}
|
||||
},
|
||||
"manifest": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"output-format": "ext4-filesystem",
|
||||
"image-type": "ext4-filesystem",
|
||||
"filename": "filesystem.img",
|
||||
"blueprint": {
|
||||
"name": "ext4-filesystem-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"output-format": "openstack",
|
||||
"image-type": "openstack",
|
||||
"filename": "disk.qcow2",
|
||||
"blueprint": {
|
||||
"name": "openstack-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"output-format": "partitioned-disk",
|
||||
"image-type": "partitioned-disk",
|
||||
"filename": "disk.img",
|
||||
"blueprint": {
|
||||
"name": "partitioned-disk-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"output-format": "qcow2",
|
||||
"image-type": "qcow2",
|
||||
"filename": "disk.qcow2",
|
||||
"blueprint": {
|
||||
"name": "qcow2-boot-test",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"type": "nspawn-extract"
|
||||
},
|
||||
"compose-request": {
|
||||
"output-format": "tar",
|
||||
"image-type": "tar",
|
||||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"filename": "root.tar.xz",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vhd",
|
||||
"image-type": "vhd",
|
||||
"filename": "disk.vhd",
|
||||
"blueprint": {
|
||||
"name": "vhd-boot-test",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"compose-request": {
|
||||
"distro": "fedora-31",
|
||||
"arch": "x86_64",
|
||||
"output-format": "vmdk",
|
||||
"image-type": "vmdk",
|
||||
"filename": "disk.vmdk",
|
||||
"blueprint": {
|
||||
"name": "vmdk-boot-test",
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"image-type": "ami",
|
||||
"filename": "image.raw.xz",
|
||||
"output-format": "ami",
|
||||
"blueprint": {}
|
||||
}
|
||||
},
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"output-format": "ext4-filesystem",
|
||||
"image-type": "ext4-filesystem",
|
||||
"filename": "filesystem.img",
|
||||
"blueprint": {
|
||||
"name": "ext4-filesystem-boot-test",
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"output-format": "openstack",
|
||||
"image-type": "openstack",
|
||||
"filename": "disk.qcow2",
|
||||
"blueprint": {
|
||||
"name": "openstack-boot-test",
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"output-format": "partitioned-disk",
|
||||
"image-type": "partitioned-disk",
|
||||
"filename": "disk.img",
|
||||
"blueprint": {
|
||||
"name": "partitioned-disk-boot-test",
|
||||
|
|
@ -99,9 +99,9 @@
|
|||
"type": "nspawn-extract"
|
||||
},
|
||||
"compose-request": {
|
||||
"output-format": "tar",
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"image-type": "tar",
|
||||
"filename": "root.tar.xz",
|
||||
"blueprint": {
|
||||
"name": "tar-boot-test",
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"output-format": "qcow2",
|
||||
"image-type": "qcow2",
|
||||
"filename": "disk.qcow2",
|
||||
"blueprint": {
|
||||
"name": "qcow2-boot-test",
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"output-format": "vhd",
|
||||
"image-type": "vhd",
|
||||
"filename": "disk.vhd",
|
||||
"blueprint": {
|
||||
"name": "vhd-boot-test",
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"output-format": "vmdk",
|
||||
"image-type": "vmdk",
|
||||
"filename": "disk.vmdk",
|
||||
"blueprint": {
|
||||
"name": "vmdk-boot-test",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ This script generates a json test case. It accepts a test_case_request as input
|
|||
"compose-request": {
|
||||
"distro": "fedora-30",
|
||||
"arch": "x86_64",
|
||||
"output-format": "qcow2",
|
||||
"image-type": "qcow2",
|
||||
"filename": "disk.qcow2",
|
||||
"blueprint": {}
|
||||
}
|
||||
|
|
@ -38,10 +38,10 @@ def main(test_case, store):
|
|||
|
||||
blueprint = json.dumps(compose_request["blueprint"])
|
||||
|
||||
pipeline_command = ["go", "run", "./cmd/osbuild-pipeline", "-distro", compose_request["distro"], "-arch", compose_request["arch"], "-image-type", compose_request["output-format"], "-"]
|
||||
pipeline_command = ["go", "run", "./cmd/osbuild-pipeline", "-distro", compose_request["distro"], "-arch", compose_request["arch"], "-image-type", compose_request["image-type"], "-"]
|
||||
test_case["manifest"] = json.loads(subprocess.check_output(pipeline_command, input=blueprint, encoding="utf-8"))
|
||||
|
||||
pipeline_command = ["go", "run", "./cmd/osbuild-pipeline", "-distro", compose_request["distro"], "-arch", compose_request["arch"], "-image-type", compose_request["output-format"], "-rpmmd", "-"]
|
||||
pipeline_command = ["go", "run", "./cmd/osbuild-pipeline", "-distro", compose_request["distro"], "-arch", compose_request["arch"], "-image-type", compose_request["image-type"], "-rpmmd", "-"]
|
||||
test_case["rpmmd"] = json.loads(subprocess.check_output(pipeline_command, input=blueprint, encoding="utf-8"))
|
||||
|
||||
if boot_type != "nspawn-extract":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue