Add Stripe parameters to TestValidateDeviceClasses testcase
@@ -6,6 +6,8 @@ import (
)
func TestValidateDeviceClasses(t *testing.T) {
+ stripe := uint(2)
+
cases := []struct {
deviceClasses []*DeviceClass
valid bool
@@ -29,6 +31,7 @@ func TestValidateDeviceClasses(t *testing.T) {
{
Name: "stripe-size",
VolumeGroup: "node1-myvg1",
+ Stripe: &stripe,
StripeSize: "4",
Default: true,
},
@@ -40,12 +43,14 @@ func TestValidateDeviceClasses(t *testing.T) {
{
Name: "stripe-size-with-unit1",
VolumeGroup: "node1-myvg1",
+ Stripe: &stripe,
StripeSize: "4m",
Default: true,
},
{
Name: "stripe-size-with-unit2",
VolumeGroup: "node1-myvg2",
+ Stripe: &stripe,
StripeSize: "4G",
},
},
@@ -112,6 +117,7 @@ func TestValidateDeviceClasses(t *testing.T) {
{
Name: "invalid-stripe-size",
VolumeGroup: "node1-myvg1",
+ Stripe: &stripe,
StripeSize: "4gib",
Default: true,
},
