Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] workspaceClient.Users.ListAll hangs if no StartIndex & TotalResults are returned #735

Open
alexott opened this issue Dec 9, 2023 · 1 comment
Assignees

Comments

@alexott
Copy link
Contributor

alexott commented Dec 9, 2023

Observed in 0.26.1 that if I'm using the following fixture in test:

	userListIdUsernameFixture = qa.HTTPFixture{
		Method:   "GET",
		Resource: "/api/2.0/preview/scim/v2/Users?attributes=id%2CuserName&count=100&startIndex=1",
		Response: iam.ListUsersResponse{
			Resources: []iam.User{
				{
					Id:       "id",
					UserName: "user@domain.com",
				},
			},
		},
		ReuseRequest: true,
	}

then workspaceClient.Users.ListAll hangs

It was found in the context of databricks/terraform-provider-databricks#2980

@mgyucht
Copy link
Contributor

mgyucht commented Jan 8, 2024

FYI: in the TF repo, I added https://github.com/databricks/terraform-provider-databricks/blob/master/qa/scim_fixtures.go to help set up fixtures more easily for TF.

Separately, in b3cdc97, we added support for higher-level mocking of the WorkspaceClient. Now you can just mock the SDK calls rather than the underlying requests on the network, which should make testing with the WorkspaceClient easier.

@mgyucht mgyucht self-assigned this Jan 8, 2024
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

No branches or pull requests

2 participants