Skip to content

Commit

Permalink
chore: get admin team test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Saup21 committed Jun 11, 2024
1 parent e2e8ca7 commit 80d91eb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
28 changes: 25 additions & 3 deletions broker/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,31 @@ type Team struct {

type TeamEmbeddedItems struct {
Pacticipants []Pacticipant `json:"pacticipants,omitempty"`
Members []User `json:"members,omitempty"`
Administrators []User `json:"administrators,omitempty"`
Environments []Environment `json:"environments,omitempty"`
Members []TeamUser `json:"members,omitempty"`
Administrators []TeamUser `json:"administrators,omitempty"`
Environments []TeamEnvironment `json:"environments,omitempty"`
}

type TeamUser struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
Active bool `json:"active"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
LastLogin string `json:"lastLogin,omitempty"`
IdentityProviderID string `json:"identityProviderId,omitempty"`
Type UserType `json:"type,omitempty"`
TypeDescription string `json:"typeDescription,omitempty"`
}

type TeamEnvironment struct {
Name string `json:"name,omitempty"`
Production bool `json:"production"`
DisplayName string `json:"displayName,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
UUID string `json:"uuid,omitempty"`
}

type TeamsResponse struct {
Expand Down
6 changes: 3 additions & 3 deletions client/client_pact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,18 @@ func TestTerraformClientPact(t *testing.T) {
Name: create.Name,
UUID: created.UUID,
Embedded: broker.TeamEmbeddedItems{
Members: []broker.User{
Members: []broker.TeamUser{
{
UUID: "4c260344-b170-41eb-b01e-c0ff10c72f25",
Active: true,
},
},
Administrators: []broker.User{
Administrators: []broker.TeamUser{
{
UUID: "4c260344-b170-41eb-b01e-c0ff10c72f25",
},
},
Environments: []broker.Environment{
Environments: []broker.TeamEnvironment{
{
UUID: "8000883c-abf0-4b4c-b993-426f607092a9",
},
Expand Down

0 comments on commit 80d91eb

Please sign in to comment.