[Bugfix] Fix Net tests being omitted (#9234)

This commit is contained in:
Sidhartha Mani
2020-03-31 01:15:21 -07:00
committed by GitHub
parent ba52a925f9
commit 7b732b566f
2 changed files with 5 additions and 10 deletions

View File

@@ -911,17 +911,13 @@ func (sys *NotificationSys) NetOBDInfo(ctx context.Context) madmin.ServerNetOBDI
'x's should be tested, and 'o's should be skipped
*/
stripPath := func(hostPath string) string {
return strings.Split(hostPath, slashSeparator)[0]
}
hostSet := set.NewStringSet()
for _, ez := range globalEndpoints {
for _, e := range ez.Endpoints {
host := stripPath(e.Host)
if hostSet.Contains(host) {
sortedGlobalEndpoints = append(sortedGlobalEndpoints, host)
hostSet.Add(host)
if !hostSet.Contains(e.Host) {
sortedGlobalEndpoints = append(sortedGlobalEndpoints, e.Host)
hostSet.Add(e.Host)
}
}
}