Conversation
…n scim settings integration test
AdminSCIMToken to Manage SCIM Tokens
There was a problem hiding this comment.
Pull request overview
Adds a new admin SCIM token resource to the Go TFE client, wiring it under the existing admin SCIM settings surface area and providing integration test coverage for the new endpoints.
Changes:
- Introduces
AdminSCIMTokensclient (List,Create,CreateWithOptions,ReadByID,Delete) and wires it underclient.Admin.Settings.SCIM.Token. - Adds integration tests for SCIM token CRUD flows and refactors existing SCIM setting tests to use the new token client.
- Adds a generic
Ptr[T]helper and generated gomock mocks + mock generation script update.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
admin_setting_scim_token.go |
Implements the admin SCIM token client and types. |
admin_setting.go |
Nests SCIM token management under Admin.Settings.SCIM.Token via SCIMResource. |
admin_setting_scim_token_integration_test.go |
Adds integration tests for create/list/read/delete SCIM tokens. |
admin_setting_scim_integration_test.go |
Removes bespoke token creation helper and uses new SCIM token client. |
helper_test.go |
Adds enableSCIM helper used by SCIM token integration tests. |
type_helpers.go |
Adds generic Ptr[T] helper for pointer options (e.g., *time.Time). |
mocks/admin_setting_scim_token_mocks.go |
Adds generated gomock for the new AdminSCIMTokens interface. |
generate_mocks.sh |
Includes SCIM token mock generation. |
CHANGELOG.md |
Documents the new AdminSCIMToken support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds site-level SCIM token management to the Admin Settings area of the go-tfe client, including new client APIs, mocks, and Enterprise integration tests, plus cleanup of prior ad-hoc SCIM token creation in tests.
Changes:
- Introduces
AdminSCIMTokensclient withCreate,List,ReadByID, andDeleteoperations. - Updates
AdminSettingsSCIM wiring to expose aTokensub-resource and adds Enterprise integration tests for SCIM tokens. - Adds a generic
Ptr[T]helper and updates mock generation + changelog.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
type_helpers.go |
Adds generic Ptr[T] helper for pointer creation. |
admin_setting.go |
Refactors SCIM settings into a grouped SCIMResource and wires in SCIM token client. |
admin_setting_scim_token.go |
Implements the new Admin SCIM token client API and types. |
admin_setting_scim_token_integration_test.go |
Adds integration tests for SCIM token CRUD behaviors. |
admin_setting_scim_integration_test.go |
Replaces custom SCIM token generation with the new client API. |
helper_test.go |
Adds enableSCIM helper for Enterprise integration tests. |
generate_mocks.sh |
Adds mockgen target for the new SCIM token interface. |
mocks/admin_setting_scim_token_mocks.go |
Generated GoMock for AdminSCIMTokens. |
CHANGELOG.md |
Documents the new Admin SCIM token support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new site-level Admin SCIM Token client/resource and related integration test coverage, and wires the SCIM token resource under the admin settings SCIM namespace.
Changes:
- Introduces
AdminSCIMTokensresource (List/Create/Read/Delete) and integrates it underclient.Admin.Settings.SCIM.Token. - Adds integration tests for Admin SCIM token CRUD and refactors existing SCIM settings integration test token creation to use the new API.
- Adds supporting utilities (generic
Ptrhelper), mock generation wiring, and a generated mock; updatesCHANGELOG.md.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
admin_setting_scim_token.go |
Adds the new Admin SCIM token client/resource and API types. |
admin_setting.go |
Nests SCIM settings + tokens under a new SCIMResource grouping (Settings.SCIM.Token). |
admin_setting_scim_token_integration_test.go |
Adds integration coverage for Admin SCIM token create/list/read/delete. |
admin_setting_scim_integration_test.go |
Switches SCIM settings tests to create SCIM tokens via the new resource. |
helper_test.go |
Adds a shared enableSCIM helper used by the new integration tests. |
type_helpers.go |
Adds a generic Ptr[T] helper for pointer options. |
generate_mocks.sh |
Registers mockgen invocation for the new SCIM token resource. |
mocks/admin_setting_scim_token_mocks.go |
Adds generated gomock for the new resource (needs regeneration to match interface). |
CHANGELOG.md |
Documents the new enhancement entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new Admin Settings sub-resource for managing site-level SCIM tokens in the go-tfe client, along with integration test coverage and supporting test/mocking utilities.
Changes:
- Introduces
AdminSCIMTokensAPI client (List,Create,CreateWithOptions,Read,Delete) foradmin/scim-tokens. - Groups SCIM-related admin settings under a new
SCIMResourceto expose both SCIM settings and SCIM token operations. - Adds/updates integration tests and helpers, plus generated mocks and changelog entry.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
admin_setting.go |
Restructures AdminSettings.SCIM to group SCIM settings + token client under SCIMResource. |
admin_setting_scim_token.go |
Adds the new SCIM token resource client and related types/options. |
admin_setting_scim_token_integration_test.go |
Adds integration tests for SCIM token create/list/read/delete behavior. |
admin_setting_scim_integration_test.go |
Updates SCIM settings integration tests to use the new SCIM token client instead of a bespoke request helper. |
helper_test.go |
Adds enableSCIM helper to consistently enable/disable SCIM for tests. |
type_helpers.go |
Adds a generic Ptr[T] helper for pointer construction in options. |
generate_mocks.sh |
Includes mock generation for the new SCIM token interface. |
mocks/admin_setting_scim_token_mocks.go |
Adds generated GoMock mocks for AdminSCIMTokens. |
CHANGELOG.md |
Documents the new AdminSCIMToken functionality. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new Admin API surface for managing site-level SCIM tokens and wires it into the existing admin settings client, along with integration coverage and supporting helpers/mocks.
Changes:
- Introduces
AdminSCIMTokensclient/resource (List,Create,CreateWithOptions,Read,Delete) and groups it underAdmin.Settings.SCIM.Tokens. - Adds integration tests for SCIM token lifecycle and refactors existing SCIM settings integration test to use the new token API.
- Adds a generic
Ptrhelper and updates mock generation to include the new resource.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| type_helpers.go | Adds a generic Ptr[T](*T) helper for tests/options. |
| mocks/admin_setting_scim_token_mocks.go | Generated GoMock for AdminSCIMTokens. |
| helper_test.go | Adds enableSCIM helper to set up/tear down SCIM + required SAML pre-reqs in tests. |
| generate_mocks.sh | Includes SCIM token resource in mock generation script. |
| admin_setting_scim_token_integration_test.go | New integration tests for create/list/read/delete of admin SCIM tokens. |
| admin_setting_scim_token.go | Implements the new Admin SCIM token API client and types. |
| admin_setting_scim_integration_test.go | Replaces manual SCIM token generation with the new Tokens.Create API. |
| admin_setting.go | Restructures AdminSettings.SCIM to group settings + tokens under a single resource. |
| CHANGELOG.md | Documents the new Admin SCIM token support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR adds a new Admin SCIM token client/resource to the tfe package so callers can manage site-level SCIM tokens through the Go client, along with integration tests and supporting helpers/mocks.
Changes:
- Introduces
AdminSCIMTokens(admin_setting_scim_token.go) withList,Create,CreateWithOptions,Read, andDelete. - Restructures
AdminSettings.SCIMinto a groupedSCIMResourcethat exposes both SCIM settings and SCIM tokens. - Adds integration tests + helpers and updates existing SCIM integration tests to use the new token API; adds generated mocks and updates mock generation script.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
admin_setting_scim_token.go |
New Admin SCIM token resource (CRUD-ish client methods + types). |
admin_setting.go |
Groups SCIM settings + tokens under SCIMResource and wires it into AdminSettings. |
admin_setting_scim_token_integration_test.go |
New integration coverage for create/list/read/delete for Admin SCIM tokens. |
helper_test.go |
Adds enableSCIM helper used by SCIM token integration tests. |
admin_setting_scim_integration_test.go |
Replaces custom SCIM token generation with new scimClient.Tokens.Create. |
type_helpers.go |
Adds generic Ptr[T] helper for pointer options (used by tests). |
mocks/admin_setting_scim_token_mocks.go |
Generated GoMock for the new AdminSCIMTokens interface. |
generate_mocks.sh |
Includes SCIM token mock in mock generation script. |
CHANGELOG.md |
Documents the enhancement (Admin SCIM token support). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new Admin SCIM Tokens resource to the go-tfe admin settings surface so callers can create/list/read/delete site-level SCIM tokens, and updates integration tests/helpers accordingly.
Changes:
- Introduces
AdminSCIMTokensclient/resource (admin_setting_scim_token.go) and wires it underclient.Admin.Settings.SCIM.Tokens. - Adds integration tests for Admin SCIM token
Create,List,Read, andDelete. - Refactors SCIM integration tests to use the new token API; adds a generic
Ptr[T]helper and generated mocks.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
type_helpers.go |
Adds generic Ptr[T] helper to simplify pointer option construction (used by new tests/options). |
admin_setting.go |
Groups SCIM settings + tokens under SCIMResource (AdminSettings.SCIM now exposes .Tokens). |
admin_setting_scim_token.go |
Implements the Admin SCIM token API client (list/create/read/delete) and types/options. |
admin_setting_scim_token_integration_test.go |
Adds integration coverage for Admin SCIM token lifecycle operations and option behaviors. |
admin_setting_scim_integration_test.go |
Updates SCIM settings integration test to create a SCIM token via the new API (removes raw request helper). |
helper_test.go |
Adds enableSCIM helper to consistently enable/disable SCIM in integration tests. |
mocks/admin_setting_scim_token_mocks.go |
Adds generated GoMock for the new AdminSCIMTokens interface. |
generate_mocks.sh |
Adds mock generation entry for admin_setting_scim_token.go. |
CHANGELOG.md |
Documents the new AdminSCIMToken enhancement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new Terraform Enterprise admin client resource for managing site-level SCIM tokens (AdminSCIMTokens), wires it into AdminSettings.SCIM, and adds integration coverage for token CRUD operations.
Changes:
- Introduces
admin_setting_scim_token.goimplementingAdminSCIMTokens(List/Create/CreateWithOptions/Read/Delete). - Restructures
AdminSettings.SCIMinto a groupedSCIMResourcethat exposes both SCIM settings and SCIM tokens. - Adds SCIM token integration tests, updates existing SCIM settings integration test to use the new token API, and updates mocks/helpers/changelog.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| type_helpers.go | Adds a generic Ptr[T] helper for pointer creation (used by new SCIM token options/tests). |
| mocks/admin_setting_scim_token_mocks.go | Adds generated GoMock stubs for the new AdminSCIMTokens interface. |
| helper_test.go | Adds enableSCIM helper to toggle SCIM prerequisites in integration tests. |
| generate_mocks.sh | Adds mock generation entry for admin_setting_scim_token.go. |
| admin_setting_scim_token_integration_test.go | New integration tests for Admin SCIM token Create/List/Read/Delete flows. |
| admin_setting_scim_token.go | New admin SCIM token client resource implementation and types. |
| admin_setting_scim_integration_test.go | Updates SCIM settings integration test to create tokens via the new API. |
| admin_setting.go | Introduces SCIMResource and updates AdminSettings.SCIM to expose settings + tokens. |
| CHANGELOG.md | Adds enhancement entry for AdminSCIMToken support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a new Admin SCIM Tokens resource to the go-tfe admin settings surface so site admins can create/list/read/delete site-level SCIM tokens, and updates integration tests/mocks accordingly.
Changes:
- Introduces
AdminSCIMTokensclient/resource (admin_setting_scim_token.go) and exposes it viaclient.Admin.Settings.SCIM.Tokens. - Adds integration coverage for Admin SCIM token Create/List/Read/Delete and refactors SCIM test token generation to use the new client.
- Adds a generic
Ptr[T]helper and generates new GoMock mocks + mockgen script entry.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| type_helpers.go | Adds generic Ptr[T any] helper for pointer values (used by SCIM token tests/options). |
| mocks/admin_setting_scim_token_mocks.go | Generated GoMock mocks for the new AdminSCIMTokens interface. |
| helper_test.go | Adds enableSCIM test helper to enable/disable SCIM (and required SAML prerequisites). |
| generate_mocks.sh | Includes mock generation for admin_setting_scim_token.go. |
| admin_setting_scim_token_integration_test.go | Adds integration tests for Admin SCIM Tokens Create/List/Read/Delete. |
| admin_setting_scim_token.go | Implements Admin SCIM Tokens API client/resource. |
| admin_setting_scim_integration_test.go | Refactors SCIM integration test token creation to use scimClient.Tokens.Create. |
| admin_setting.go | Restructures AdminSettings.SCIM to group SCIM settings + tokens under SCIMResource. |
| CHANGELOG.md | Documents the new Admin SCIM token support enhancement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Maed223
left a comment
There was a problem hiding this comment.
Looks good, glad we were able to get this in while the SCIMSettings is unreleased to we can have that SCIMResource interface without a breaking change.
|
Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes. |
Description
This PR adds support for site-level SCIM Token via
admin_setting_scim_token.goresource. It also includes integration tests, supporting helper functions, and generated mocks for the new resource.it also does cleanup in
admin_setting_scim_integration_test.gorelated to generating scim tokenTesting plan
Create,List,ReadandDeletefor Admin SCIM TokensExternal links
JIRA
RFC
Output from tests
ENABLE_TFE=1 envchain scim gotest -v -run "TestAdminSettings_SCIM_(Read|Update|Delete)"ENABLE_TFE=1 envchain scim gotest -v -run "TestAdminSCIMTokens_(Create|List|Read|Delete)"Rollback Plan
we can revert this pr
Changes to Security Controls
NA