Merge pull request #69451 from justinsb/sort_bind_options
Sort bind options in JoinMountOptions
This commit is contained in:
commit
a29b093a56
@ -371,7 +371,7 @@ func TestMountOptions(t *testing.T) {
|
|||||||
t.Errorf("Expected success, got: %v", err)
|
t.Errorf("Expected success, got: %v", err)
|
||||||
}
|
}
|
||||||
mountOptions := fakeMounter.MountPoints[0].Opts
|
mountOptions := fakeMounter.MountPoints[0].Opts
|
||||||
expectedMountOptions := []string{"bind", "_netdev"}
|
expectedMountOptions := []string{"_netdev", "bind"}
|
||||||
if !reflect.DeepEqual(mountOptions, expectedMountOptions) {
|
if !reflect.DeepEqual(mountOptions, expectedMountOptions) {
|
||||||
t.Errorf("Expected mount options to be %v got %v", expectedMountOptions, mountOptions)
|
t.Errorf("Expected mount options to be %v got %v", expectedMountOptions, mountOptions)
|
||||||
}
|
}
|
||||||
|
@ -766,7 +766,7 @@ func JoinMountOptions(userOptions []string, systemOptions []string) []string {
|
|||||||
for _, mountOption := range systemOptions {
|
for _, mountOption := range systemOptions {
|
||||||
allMountOptions.Insert(mountOption)
|
allMountOptions.Insert(mountOption)
|
||||||
}
|
}
|
||||||
return allMountOptions.UnsortedList()
|
return allMountOptions.List()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateZone returns:
|
// ValidateZone returns:
|
||||||
|
Loading…
Reference in New Issue
Block a user