test: update type names to new names
The image type names for Fedora were changed in images 0.138.0, aliases were left behind so the old names still exist. Split out the testcases between rhel and fedora so we test for the new names being returned. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
31d1665f7e
commit
242564cc5c
1 changed files with 58 additions and 10 deletions
|
|
@ -846,10 +846,16 @@ func TestGetImageRequests_ImageTypeConversion(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
requestedImageType: ImageTypesAws,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "ami",
|
||||
expectedTargetName: target.TargetNameAWS,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesAws,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "server-ami",
|
||||
expectedTargetName: target.TargetNameAWS,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesAwsHaRhui,
|
||||
requestedDistros: []string{rhel8, rhel9},
|
||||
|
|
@ -870,10 +876,16 @@ func TestGetImageRequests_ImageTypeConversion(t *testing.T) {
|
|||
},
|
||||
{
|
||||
requestedImageType: ImageTypesAzure,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "vhd",
|
||||
expectedTargetName: target.TargetNameAzureImage,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesAzure,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "server-vhd",
|
||||
expectedTargetName: target.TargetNameAzureImage,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesAzureEap7Rhui,
|
||||
requestedDistros: []string{rhel8},
|
||||
|
|
@ -930,16 +942,28 @@ func TestGetImageRequests_ImageTypeConversion(t *testing.T) {
|
|||
},
|
||||
{
|
||||
requestedImageType: ImageTypesGuestImage,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "qcow2",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesGuestImage,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "server-qcow2",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesImageInstaller,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "image-installer",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesImageInstaller,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "minimal-installer",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesIotBootableContainer,
|
||||
requestedDistros: []string{fedora},
|
||||
|
|
@ -967,7 +991,7 @@ func TestGetImageRequests_ImageTypeConversion(t *testing.T) {
|
|||
{
|
||||
requestedImageType: ImageTypesIotRawImage,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "iot-raw-image",
|
||||
expectedImageType: "iot-raw-xz",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
|
|
@ -979,33 +1003,57 @@ func TestGetImageRequests_ImageTypeConversion(t *testing.T) {
|
|||
{
|
||||
requestedImageType: ImageTypesLiveInstaller,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "live-installer",
|
||||
expectedImageType: "workstation-live-installer",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesMinimalRaw,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "minimal-raw",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesMinimalRaw,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "minimal-raw-xz",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesOci,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "oci",
|
||||
expectedTargetName: target.TargetNameOCIObjectStorage,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesOci,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "server-oci",
|
||||
expectedTargetName: target.TargetNameOCIObjectStorage,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesVsphere,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "vmdk",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesVsphere,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "server-vmdk",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesVsphereOva,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
requestedDistros: []string{rhel8, centos8, rhel9, centos9},
|
||||
expectedImageType: "ova",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesVsphereOva,
|
||||
requestedDistros: []string{fedora},
|
||||
expectedImageType: "server-ova",
|
||||
expectedTargetName: target.TargetNameAWSS3,
|
||||
},
|
||||
{
|
||||
requestedImageType: ImageTypesWsl,
|
||||
requestedDistros: []string{fedora, rhel8, centos8, rhel9, centos9},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue