Skip to content

Commit

Permalink
feat(teams) Unit tests for members in team (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
gciezkowski-acc committed Dec 16, 2024
1 parent de04f03 commit 23bf710
Show file tree
Hide file tree
Showing 7 changed files with 664 additions and 386 deletions.
27 changes: 24 additions & 3 deletions charts/manager/crds/greenhouse.sap_teams.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -65,6 +62,29 @@ spec:
status:
description: TeamStatus defines the observed state of Team
properties:
members:
items:
description: User specifies a human person.
properties:
email:
description: Email of the user.
type: string
firstName:
description: FirstName of the user.
type: string
id:
description: ID is the unique identifier of the user.
type: string
lastName:
description: LastName of the user.
type: string
required:
- email
- firstName
- id
- lastName
type: object
type: array
statusConditions:
description: |-
A StatusConditions contains a list of conditions.
Expand Down Expand Up @@ -105,6 +125,7 @@ spec:
x-kubernetes-list-type: map
type: object
required:
- members
- statusConditions
type: object
type: object
Expand Down
157 changes: 157 additions & 0 deletions charts/manager/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- ""
resources:
- events
- secrets
- serviceaccounts
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- apiGroups:
- dex.coreos.com
resources:
- connectors
- oauth2clients
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- greenhouse.sap
resources:
- cluster-kubeconfigs
- teamroles
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- greenhouse.sap
resources:
- clusters
- organizations
- plugindefinitions
- plugins
- teammemberships
- teamrolebindings
- teams
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- greenhouse.sap
resources:
- clusters/finalizers
- organizations/finalizers
- plugindefinitions/finalizers
- pluginpresets/finalizers
- plugins/finalizers
- teammemberships/finalizers
- teamrolebindings/finalizers
- teams/finalizers
verbs:
- update
- apiGroups:
- greenhouse.sap
resources:
- clusters/status
- organizations/status
- plugindefinitions/status
- pluginpresets/status
- teammemberships/status
- teamrolebindings/status
- teams/status
verbs:
- get
- patch
- update
- apiGroups:
- greenhouse.sap
resources:
- pluginpresets
verbs:
- get
- list
- update
- watch
- apiGroups:
- greenhouse.sap
resources:
- plugins/status
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- greenhouse.sap
resources:
- teammemberships=
verbs:
- get
- list
- apiGroups:
- rbac
resources:
- clusterrolebindings
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
- clusterroles
- rolebindings
- roles
verbs:
- create
- get
- list
- patch
- update
- watch
Loading

0 comments on commit 23bf710

Please sign in to comment.