fix: make auth source group sync correctly handle team removal (#37161)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind
2026-07-24 04:05:38 +02:00
committed by GitHub
parent 3c66ec4064
commit 99ca4bff7d
4 changed files with 134 additions and 8 deletions
+10
View File
@@ -35,4 +35,14 @@ func TestSet(t *testing.T) {
assert.False(t, s.Contains("key1"))
assert.True(t, s.Contains("key6"))
assert.True(t, s.Contains("key7"))
s = SetOf("a", "b", "c")
n := s.RemoveFromSet(SetOf("b", "c", "d"))
assert.Equal(t, 2, n)
assert.ElementsMatch(t, []string{"a"}, s.Values())
s = SetOf("a", "b", "c")
n = s.RemoveFromSlice([]string{"b", "c", "d"})
assert.Equal(t, 2, n)
assert.ElementsMatch(t, []string{"a"}, s.Values())
}