Migrate golanglint-ci config to V2 (#21081)

This commit is contained in:
Taran Pelkey
2025-03-29 20:56:02 -04:00
committed by GitHub
parent b67f0cf721
commit e88d494775
77 changed files with 239 additions and 290 deletions

View File

@@ -642,7 +642,7 @@ func (s *TestSuiteIAM) TestSTSForRoot(c *check) {
gotBuckets := set.NewStringSet()
for _, b := range accInfo.Buckets {
gotBuckets.Add(b.Name)
if !(b.Access.Read && b.Access.Write) {
if !b.Access.Read || !b.Access.Write {
c.Fatalf("root user should have read and write access to bucket: %v", b.Name)
}
}
@@ -1443,7 +1443,7 @@ func (s *TestSuiteIAM) TestLDAPUnicodeVariationsLegacyAPI(c *check) {
idx := slices.IndexFunc(policyResult.PolicyMappings, func(e madmin.PolicyEntities) bool {
return e.Policy == policy && slices.Contains(e.Groups, actualGroupDN)
})
if !(idx >= 0) {
if idx < 0 {
c.Fatalf("expected groupDN (%s) to be present in mapping list: %#v", actualGroupDN, policyResult)
}
}
@@ -1606,7 +1606,7 @@ func (s *TestSuiteIAM) TestLDAPUnicodeVariations(c *check) {
idx := slices.IndexFunc(policyResult.PolicyMappings, func(e madmin.PolicyEntities) bool {
return e.Policy == policy && slices.Contains(e.Groups, actualGroupDN)
})
if !(idx >= 0) {
if idx < 0 {
c.Fatalf("expected groupDN (%s) to be present in mapping list: %#v", actualGroupDN, policyResult)
}
}