Loading gitlab_test/groups_integration_test.go +9 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,10 @@ func Test_GroupsCreateGroup_AllFields_Integration(t *testing.T) { "default_branch_protection_defaults": "nested struct; covered by CodeOwnerApprovalRequired test", "enabled_git_access_protocol": "not returned in create response; tested via update", // Skip due to async creation // see: https://gitlab.com/gitlab-community/gitlab-org/gitlab/-/blob/master/app/services/groups/create_service.rb?ref_type=heads#L93 "crm_enabled": "Gets set as part of a background process, so race conditions cause it to come back as `false` on the response", // Duo isn't yet enabled on the integration test instance — see // https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/3086 // for the in-flight work to wire it up. Re-enable when that lands. Loading Loading @@ -388,6 +392,11 @@ func Test_GroupsUpdateGroup_AllFields_Integration(t *testing.T) { "default_branch_protection": "deprecated", "default_branch_protection_defaults": "nested struct; covered by CodeOwnerApprovalRequired test", "step_up_auth_required_oauth_provider": "needs a configured OAuth provider", // Skip due to async creation // see: https://gitlab.com/gitlab-community/gitlab-org/gitlab/-/blob/master/app/services/groups/create_service.rb?ref_type=heads#L93 "crm_enabled": "Gets set as part of a background process, so race conditions cause it to come back as `false` on the response", // Duo isn't yet enabled on the integration test instance — see // https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/3086 // for the in-flight work to wire it up. Re-enable when that lands. Loading groups.go +7 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,9 @@ type Group struct { MathRenderingLimitsEnabled bool `json:"math_rendering_limits_enabled"` LockMathRenderingLimitsEnabled bool `json:"lock_math_rendering_limits_enabled"` // Customer relations management CRMEnabled bool `json:"crm_enabled"` // Deprecated: will be removed in v5 of the API, use ListGroupProjects instead Projects []*Project `json:"projects"` Loading Loading @@ -602,6 +605,8 @@ type CreateGroupOptions struct { MathRenderingLimitsEnabled *bool `url:"math_rendering_limits_enabled,omitempty" json:"math_rendering_limits_enabled,omitempty"` CRMEnabled *bool `url:"crm_enabled,omitempty" json:"crm_enabled,omitempty"` WebBasedCommitSigningEnabled *bool `url:"web_based_commit_signing_enabled,omitempty" json:"web_based_commit_signing_enabled,omitempty"` AllowPersonalSnippets *bool `url:"allow_personal_snippets,omitempty" json:"allow_personal_snippets,omitempty"` } Loading Loading @@ -753,6 +758,8 @@ type UpdateGroupOptions struct { DuoFeaturesEnabled *bool `url:"duo_features_enabled,omitempty" json:"duo_features_enabled,omitempty"` LockDuoFeaturesEnabled *bool `url:"lock_duo_features_enabled,omitempty" json:"lock_duo_features_enabled,omitempty"` CRMEnabled *bool `url:"crm_enabled,omitempty" json:"crm_enabled,omitempty"` WebBasedCommitSigningEnabled *bool `url:"web_based_commit_signing_enabled,omitempty" json:"web_based_commit_signing_enabled,omitempty"` AllowPersonalSnippets *bool `url:"allow_personal_snippets,omitempty" json:"allow_personal_snippets,omitempty"` } Loading groups_test.go +5 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,8 @@ func TestGetGroup_FullResponseFields(t *testing.T) { "duo_features_enabled": true, "lock_duo_features_enabled": true, "math_rendering_limits_enabled": true, "lock_math_rendering_limits_enabled": true "lock_math_rendering_limits_enabled": true, "crm_enabled": true }`) }) Loading @@ -167,6 +168,7 @@ func TestGetGroup_FullResponseFields(t *testing.T) { LockDuoFeaturesEnabled: true, MathRenderingLimitsEnabled: true, LockMathRenderingLimitsEnabled: true, CRMEnabled: true, } assert.Equal(t, want, group) } Loading Loading @@ -252,6 +254,8 @@ func TestCreateGroup_FullAttributes(t *testing.T) { MathRenderingLimitsEnabled: Ptr(true), CRMEnabled: Ptr(true), WebBasedCommitSigningEnabled: Ptr(true), AllowPersonalSnippets: Ptr(true), } Loading Loading
gitlab_test/groups_integration_test.go +9 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,10 @@ func Test_GroupsCreateGroup_AllFields_Integration(t *testing.T) { "default_branch_protection_defaults": "nested struct; covered by CodeOwnerApprovalRequired test", "enabled_git_access_protocol": "not returned in create response; tested via update", // Skip due to async creation // see: https://gitlab.com/gitlab-community/gitlab-org/gitlab/-/blob/master/app/services/groups/create_service.rb?ref_type=heads#L93 "crm_enabled": "Gets set as part of a background process, so race conditions cause it to come back as `false` on the response", // Duo isn't yet enabled on the integration test instance — see // https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/3086 // for the in-flight work to wire it up. Re-enable when that lands. Loading Loading @@ -388,6 +392,11 @@ func Test_GroupsUpdateGroup_AllFields_Integration(t *testing.T) { "default_branch_protection": "deprecated", "default_branch_protection_defaults": "nested struct; covered by CodeOwnerApprovalRequired test", "step_up_auth_required_oauth_provider": "needs a configured OAuth provider", // Skip due to async creation // see: https://gitlab.com/gitlab-community/gitlab-org/gitlab/-/blob/master/app/services/groups/create_service.rb?ref_type=heads#L93 "crm_enabled": "Gets set as part of a background process, so race conditions cause it to come back as `false` on the response", // Duo isn't yet enabled on the integration test instance — see // https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/3086 // for the in-flight work to wire it up. Re-enable when that lands. Loading
groups.go +7 −0 Original line number Diff line number Diff line Loading @@ -350,6 +350,9 @@ type Group struct { MathRenderingLimitsEnabled bool `json:"math_rendering_limits_enabled"` LockMathRenderingLimitsEnabled bool `json:"lock_math_rendering_limits_enabled"` // Customer relations management CRMEnabled bool `json:"crm_enabled"` // Deprecated: will be removed in v5 of the API, use ListGroupProjects instead Projects []*Project `json:"projects"` Loading Loading @@ -602,6 +605,8 @@ type CreateGroupOptions struct { MathRenderingLimitsEnabled *bool `url:"math_rendering_limits_enabled,omitempty" json:"math_rendering_limits_enabled,omitempty"` CRMEnabled *bool `url:"crm_enabled,omitempty" json:"crm_enabled,omitempty"` WebBasedCommitSigningEnabled *bool `url:"web_based_commit_signing_enabled,omitempty" json:"web_based_commit_signing_enabled,omitempty"` AllowPersonalSnippets *bool `url:"allow_personal_snippets,omitempty" json:"allow_personal_snippets,omitempty"` } Loading Loading @@ -753,6 +758,8 @@ type UpdateGroupOptions struct { DuoFeaturesEnabled *bool `url:"duo_features_enabled,omitempty" json:"duo_features_enabled,omitempty"` LockDuoFeaturesEnabled *bool `url:"lock_duo_features_enabled,omitempty" json:"lock_duo_features_enabled,omitempty"` CRMEnabled *bool `url:"crm_enabled,omitempty" json:"crm_enabled,omitempty"` WebBasedCommitSigningEnabled *bool `url:"web_based_commit_signing_enabled,omitempty" json:"web_based_commit_signing_enabled,omitempty"` AllowPersonalSnippets *bool `url:"allow_personal_snippets,omitempty" json:"allow_personal_snippets,omitempty"` } Loading
groups_test.go +5 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,8 @@ func TestGetGroup_FullResponseFields(t *testing.T) { "duo_features_enabled": true, "lock_duo_features_enabled": true, "math_rendering_limits_enabled": true, "lock_math_rendering_limits_enabled": true "lock_math_rendering_limits_enabled": true, "crm_enabled": true }`) }) Loading @@ -167,6 +168,7 @@ func TestGetGroup_FullResponseFields(t *testing.T) { LockDuoFeaturesEnabled: true, MathRenderingLimitsEnabled: true, LockMathRenderingLimitsEnabled: true, CRMEnabled: true, } assert.Equal(t, want, group) } Loading Loading @@ -252,6 +254,8 @@ func TestCreateGroup_FullAttributes(t *testing.T) { MathRenderingLimitsEnabled: Ptr(true), CRMEnabled: Ptr(true), WebBasedCommitSigningEnabled: Ptr(true), AllowPersonalSnippets: Ptr(true), } Loading