File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,8 @@ var settings = []Setting{
92
92
},
93
93
{
94
94
name : "memory" ,
95
- set : SetInt ,
96
- validations : []setFn {IsPositive },
95
+ set : SetString ,
96
+ validations : []setFn {IsValidDiskSize },
97
97
callbacks : []setFn {RequiresRestartMsg },
98
98
},
99
99
{
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ func TestSetNotAllowed(t *testing.T) {
38
38
if err == nil || err .Error () != "run validations for \" driver\" with value of \" 123456\" : [driver \" 123456\" is not supported]" {
39
39
t .Fatalf ("Set did not return error for unallowed value: %+v" , err )
40
40
}
41
+ err = Set ("memory" , "10a" )
42
+ if err == nil || err .Error () != "run validations for \" memory\" with value of \" 10a\" : [invalid disk size: invalid size: '10a']" {
43
+ t .Fatalf ("Set did not return error for unallowed value: %+v" , err )
44
+ }
41
45
}
42
46
43
47
func TestSetOK (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments