Fix duplicate groups in ListGroups API (#20396)

This commit is contained in:
Taran Pelkey
2024-09-06 20:28:47 -04:00
committed by GitHub
parent 261111e728
commit 84e122c5c3
2 changed files with 11 additions and 8 deletions
+4 -2
View File
@@ -28,6 +28,7 @@ import (
"net/http"
"net/url"
"runtime"
"slices"
"strings"
"testing"
"time"
@@ -770,8 +771,9 @@ func (s *TestSuiteIAM) TestGroupAddRemove(c *check) {
if err != nil {
c.Fatalf("group list err: %v", err)
}
if !set.CreateStringSet(groups...).Contains(group) {
c.Fatalf("created group not present!")
expected := []string{group}
if !slices.Equal(groups, expected) {
c.Fatalf("expected group listing: %v, got: %v", expected, groups)
}
groupInfo, err := s.adm.GetGroupDescription(ctx, group)
if err != nil {