Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions go/team_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,3 +653,30 @@ func TestGroupExtendedFields(t *testing.T) {
t.Errorf("expected 1 component role, got %d", len(team.Group.ComponentRoles))
}
}

func TestTeamPeopleLDAPGroups(t *testing.T) {
service := setupTestService(t)

team := service.GetTeamByName("test-team")
if team == nil {
t.Fatal("expected team, got nil")
}

if len(team.Group.PeopleLDAPGroups) != 1 {
t.Fatalf("expected 1 LDAP group, got %d", len(team.Group.PeopleLDAPGroups))
}
if team.Group.PeopleLDAPGroups[0] != "test-team-ldap" {
t.Errorf("expected LDAP group 'test-team-ldap', got '%s'", team.Group.PeopleLDAPGroups[0])
}

platform := service.GetTeamByName("platform-team")
if platform == nil {
t.Fatal("expected platform-team, got nil")
}
if len(platform.Group.PeopleLDAPGroups) != 1 {
t.Fatalf("expected 1 LDAP group for platform-team, got %d", len(platform.Group.PeopleLDAPGroups))
}
if platform.Group.PeopleLDAPGroups[0] != "platform-team-ldap" {
t.Errorf("expected LDAP group 'platform-team-ldap', got '%s'", platform.Group.PeopleLDAPGroups[0])
}
}
1 change: 1 addition & 0 deletions go/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ type Team struct {
type Group struct {
Type GroupType `json:"type"`
ResolvedPeopleUIDList []string `json:"resolved_people_uid_list"`
PeopleLDAPGroups []string `json:"people_ldap_groups,omitempty"`
Slack *SlackConfig `json:"slack,omitempty"`
Roles []RoleInfo `json:"resolved_roles,omitempty"`
Jiras []JiraInfo `json:"jiras,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions python/orgdatacore/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class Group(BaseModel):

type: GroupType = Field(default_factory=GroupType)
resolved_people_uid_list: tuple[str, ...] = ()
people_ldap_groups: tuple[str, ...] = ()
slack: SlackConfig | None = None
roles: tuple[RoleInfo, ...] = Field(default=(), alias="resolved_roles")
jiras: tuple[JiraInfo, ...] = ()
Expand Down
2 changes: 2 additions & 0 deletions testdata/test_org_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"group": {
"type": {"name": "team", "visualize": true},
"resolved_people_uid_list": ["jsmith", "adoe"],
"people_ldap_groups": ["test-team-ldap"],
"resolved_roles": [
{"people": ["adoe"], "roles": ["manager"]},
{"people": ["jsmith"], "roles": ["tech_lead"]}
Expand Down Expand Up @@ -88,6 +89,7 @@
"group": {
"type": {"name": "team", "visualize": true},
"resolved_people_uid_list": ["bwilson"],
"people_ldap_groups": ["platform-team-ldap"],
"resolved_roles": [
{"people": ["bwilson"], "roles": ["tech_lead"]}
],
Expand Down