mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-05 07:26:56 +00:00
pv_controller: update tests for multiple storageclasses
Signed-off-by: danishprakash <grafitykoncept@gmail.com>
This commit is contained in:
@@ -55,6 +55,8 @@ func GetDefaultClass(lister storagev1listers.StorageClassLister) (*storagev1.Sto
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Primary sort by creation timestamp, newest first
|
||||
// Secondary sort by class name, ascending order
|
||||
sort.Slice(defaultClasses, func(i, j int) bool {
|
||||
if defaultClasses[i].CreationTimestamp.UnixNano() == defaultClasses[j].CreationTimestamp.UnixNano() {
|
||||
return defaultClasses[i].Name < defaultClasses[j].Name
|
||||
|
||||
Reference in New Issue
Block a user