distro/rhel8: update distro unit tests
This commit is contained in:
parent
9706de4f44
commit
2bdf6c724f
2 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package rhel8
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ func TestDistro_UnsupportedArch(t *testing.T) {
|
|||
name: "unsupported_arch",
|
||||
}
|
||||
_, err := testBasicImageType.getPartitionTable(mountpoints, distro.ImageOptions{}, rng)
|
||||
require.EqualError(t, err, "unknown arch: "+testBasicImageType.arch.name)
|
||||
require.EqualError(t, err, fmt.Sprintf("no partition table defined for architecture %q for image type %q", testBasicImageType.arch.name, testBasicImageType.name))
|
||||
}
|
||||
|
||||
func TestDistro_DefaultPartitionTables(t *testing.T) {
|
||||
|
|
@ -66,7 +67,7 @@ func TestDistro_Ec2PartitionTables(t *testing.T) {
|
|||
assert.True(t, pt.ContainsMountpoint(m.Mountpoint))
|
||||
}
|
||||
} else {
|
||||
require.EqualError(t, err, "unknown arch: "+testEc2ImageType.arch.name)
|
||||
require.EqualError(t, err, fmt.Sprintf("no partition table defined for architecture %q for image type %q", testEc2ImageType.arch.name, testEc2ImageType.name))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -319,6 +319,8 @@ func TestImageType_Name(t *testing.T) {
|
|||
imgNames: []string{
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"vhd",
|
||||
"azure-rhui",
|
||||
"ami",
|
||||
"ec2",
|
||||
"edge-commit",
|
||||
|
|
@ -512,6 +514,8 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
imgNames: []string{
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"vhd",
|
||||
"azure-rhui",
|
||||
"ami",
|
||||
"ec2",
|
||||
"edge-commit",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue