Skip to content

Adds scim settings, scim settings integration tests and generated mocks#1307

Open
skj-skj wants to merge 14 commits intomainfrom
skj/scim-settings
Open

Adds scim settings, scim settings integration tests and generated mocks#1307
skj-skj wants to merge 14 commits intomainfrom
skj/scim-settings

Conversation

@skj-skj
Copy link
Copy Markdown
Contributor

@skj-skj skj-skj commented Apr 9, 2026

Description

This PR adds site-level SCIM settings support via a new admin_setting_scim.go resource and the AdminSettings.SCIM interface. It also includes integration tests, supporting helper functions, and generated mocks for the new resource.

Reviewer Note

generateSCIMToken currently performs a direct API call to generate the SCIM token, as go-tfe does not yet expose a SCIM token resource. This will be cleaned up in a subsequent PR that introduces first-class SCIM token support.

Testing plan

  1. Added Integration test for Read, Update and Delete for SCIM Settings

External links

Output from tests

image

Rollback Plan

we can revert this pr

Changes to Security Controls

NA

@datadog-terraform-cloud-hashicorp
Copy link
Copy Markdown

datadog-terraform-cloud-hashicorp bot commented Apr 9, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Other Violations

🧪 6 Tests failed

TestAgentsRead from agent_integration_test.go   View in Datadog   (Fix with Cursor)
failed test
TestAgentsRead/when_the_agent_does_not_exist from agent_integration_test.go   View in Datadog   (Fix with Cursor)

	Error Trace:	/home/runner/work/go-tfe/go-tfe/agent_integration_test.go:39
	            				/home/runner/go/pkg/mod/github.com/!data!dog/dd-trace-go/v2@v2.7.1/internal/civisibility/integrations/gotesting/instrumentation_orchestrion.go:335
	            				/home/runner/go/pkg/mod/github.com/!data!dog/dd-trace-go/v2@v2.7.1/internal/civisibility/integrations/gotesting/instrumentation_orchestrion.go:339
	Error:      	Not equal: 
	            	expected: &errors.errorString{s:"internal server error"}
	            	actual  : &errors.errorString{s:"resource not found"}
	            	
	            	Diff:
	            	--- Expected
...
TestOrganizationsUpdate from organization_integration_test.go   View in Datadog   (Fix with Cursor)
failed test
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f50277d | Docs | Was this helpful? Give us feedback!

@skj-skj skj-skj marked this pull request as ready for review April 9, 2026 16:12
@skj-skj skj-skj requested a review from a team as a code owner April 9, 2026 16:12
@skj-skj skj-skj requested a review from Copilot April 9, 2026 18:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces site-level SCIM settings support to the go-tfe Admin Settings surface area (new SCIM settings resource + interface), along with integration tests, helper utilities, and generated GoMock stubs to support the new API.

Changes:

  • Adds a new SCIM admin settings resource (admin_setting_scim.go) and wires it into AdminSettings.
  • Adds SCIM settings integration tests and helper functions to exercise read/update/delete behavior.
  • Updates changelog and mock generation outputs/scripts for the new SCIM settings interface.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
admin_setting.go Adds AdminSettings.SCIM and initializes the SCIM settings client.
admin_setting_scim.go New SCIM settings interface, models, and CRUD methods against admin/scim-settings.
admin_setting_scim_integration_test.go Integration coverage for SCIM settings read/update/delete + SCIM token/group helpers.
helper_test.go Adds SAML enable/provider helpers and a helper to create SCIM groups via the SCIM API.
generate_mocks.sh Adds mockgen invocation for the SCIM settings interface.
mocks/admin_setting_scim_mocks.go Generated GoMock implementation for the SCIM settings interface.
CHANGELOG.md Documents the new SCIM settings API additions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

skj-skj and others added 3 commits April 10, 2026 14:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants